Hello all 
I am trying to build a functionality such that we have three integer fields(val1, val2 & val3) in a module. Now, we want to use formula and get final value(answer). If the final value < 0 or final value is equal to val1. Then we want to notify about it to set of people.
Is it possible to achieve in the SuiteCRM? If yes, how can I do it?
Please help!
Yes. Search docs for âWorkflowâ and âCalculated fieldâ. You make a field âAnswerâ and the type is Calculated field. Set âAnswerâ to calculate your formula. Set workflow to when âAnswerâ equals your expected value or < 0
, then do the action, notify the set of people.
1 Like
I donât think a calculated field would work by itself because you canât use the calculation in the conditional logic. Youâd need two workflows. (maybe 3)
You are going to want to run 1 workflow to do the calculation⌠only in scheduler to populate val4 = total.
Then youâre going to want to run a workflow in the scheduler to send the email based on the value of val4. The only tricky part is that if you have repeated runs checked, it will create this as long as the condition is true and keep sending emails. If you have it unchecked, it will only fire once. So⌠you need some mechanism in addtion to the val4 to fire the workflow.
What I would do is create a task for the rep. Then have a field in the original record like âtask createdâ = yes and then when the workflow runs, it will not create the task again as long as = yes.
Then a third workflow that fires on save of the task âcompleteâ to go back and change âtask createdâ back to no, so the original workflow is OK to run again. (assuming the completion of the task changes val4 in such away that it wonât immediately run again).
1 Like