Announcement

Collapse
No announcement yet.

How to create a dynamicLogic for Opportunity age ??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nishan Perera
    replied
    Is there anyone can help me on this ?

    Leave a comment:


  • Nishan Perera
    replied
    Originally posted by Nishan Perera View Post
    yuri could you please help me on this. appreciate your support.
    yuri Can you support me on this ?

    Leave a comment:


  • Maximus
    commented on 's reply
    Hi,
    Sorry, can't help here. It is out of my skills.

  • Nishan Perera
    replied
    yuri could you please help me on this. appreciate your support.

    Leave a comment:


  • Nishan Perera
    replied
    Hi Maximus , Could you also advice me on above which is "stop the age calculation if stage change to closed won or closed lost."

    Leave a comment:


  • Nishan Perera
    replied
    Hi yuri,

    I need some support on opportunity age calculation which is now working perfectly. Thing is I want to stop the age calculation if stage change to closed won or closed lost.

    Is this possible to achieve ? Let me know.

    Leave a comment:


  • Nishan Perera
    replied
    Originally posted by yurikuzn View Post
    Create a notStorable field and define SQL in "select" in entityDefs. Example here: https://forum.espocrm.com/forum/deve...storable-bools

    You need something like this:

    Code:
    "ageDays": {
    "type": "int",
    "notStorable": true,
    "readOnly": true,
    "select": "DATEDIFF(NOW(), created_at)",
    "orderBy": "DATEDIFF(NOW(), created_at) {direction}"
    }
    Thank you for the code yuri. without entering table name i'm getting "Internal server error 500".

    For me this worked

    custom\Espo\Custom\Resources\metadata\entityDefs\O pportunity.json

    Code:
    {
        "fields": {
            "oppAge": {
                "type": "int",
                "notStorable": true,
                "select": "DATEDIFF(NOW(), opportunity.created_at)",
                "orderBy": "DATEDIFF(NOW(), opportunity.created_at) {direction}",
                "readOnly": true,
                "isCustom": true
            }
        }
    }
    Thank you for the support .!
    Last edited by Nishan Perera; 06-02-2020, 06:59 PM.

    Leave a comment:


  • yuri
    replied
    Create a notStorable field and define SQL in "select" in entityDefs. Example here: https://forum.espocrm.com/forum/deve...storable-bools

    You need something like this:

    Code:
    "ageDays": {
        "type": "int",
        "notStorable": true,
        "readOnly": true,
        "select": "DATEDIFF(NOW(), created_at)",
        "orderBy": "DATEDIFF(NOW(), created_at) {direction}"
    }
    Last edited by yuri; 05-27-2020, 09:23 AM.

    Leave a comment:


  • Maximus
    replied
    As far as I know there is no such an ability.

    Leave a comment:


  • Nishan Perera
    replied
    Originally posted by Maximus View Post
    Hi,
    If you are talking about auto-counting of the age field, you can use scheduled workflow with a report.
    I tried that, But it change the data modify date and the user. is it possible to do without update those data ?

    Leave a comment:


  • Maximus
    replied
    Hi,
    If you are talking about auto-counting of the age field, you can use scheduled workflow with a report.

    Leave a comment:


  • How to create a dynamicLogic for Opportunity age ??

    Hi,

    I want a field which is to show age of a particular opportunity with dynamic logic. opportunity age field read only and should update automatically ?? how it can be done ?

    any help ??
Working...
X