Announcement
Collapse
No announcement yet.
How to create a dynamicLogic for Opportunity age ??
Collapse
X
-
-
-
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:
-
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:
-
Originally posted by yurikuzn View PostCreate 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}" }
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 } } }
Last edited by Nishan Perera; 06-02-2020, 06:59 PM.
- Likes 1
Leave a comment:
-
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.
- Likes 3
Leave a comment:
-
Originally posted by Maximus View PostHi,
If you are talking about auto-counting of the age field, you can use scheduled workflow with a report.
Leave a comment:
-
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 ??Tags: None
Leave a comment: