Question

When stage changes in DCM, check the amount

Hi Community,

I have a requirement that when I change the case manually from New to PO Issued, it need to check whether the amount in Include Tax from Amount details and the sum of all the Amount from RR Allocation Table is Equal or not. If not equal then a Pop-up will come and the stage change back to previous one.

Can anyone help me how to configure the requirement in the backend ?

 

 

Regards,

Jagan

Like 0

Like

3 comments

Hello Jagan,

 

I am afraid there is no ready OOTB logic to perform checks when changing the stage, as well as there, are no OOTB pop-up windows, but there is a work-around:

 

To have a pop-up windows element in business processes you will need the following marketplace solution: 

https://marketplace.creatio.com/template/popup-element-business-process…

 

You will need to create a Business Process that will be triggered as the stage is changed and check whether the values are equal. In case they are not - show the pop-up window and return the case to the previous stage. Should the values be fine - the Business Process won't change anything.

 

I hope our recommendation helps you to solve this task.

 

Best Regards,

Dan

Denis Bidukha,

Hello Dan,

I have created a business process for the requirement but sometimes the pop-up window is coming and sometimes it is not coming. So I want to achieve it through code in the backend.

 

Thanks,

Jagan

Jagan Nayak,

 

Alternatively, you can add an asyncValidate method to your page and it will be called on the save of the page. 

Basically, you need to create a validation method, that returns 

result = {
success : true
 } 

if the validation was successful, otherwise it should return 

result = { 
success : false 
 }

Inside the validation method, if the validation is not passed, you can call 

Terrasoft.showInformation(message); 

for example: 

Terrasoft.showInformation('Amount A is not equal to Amount B '); 

and then call your validation method  inside asyncValidate method. 

 

You can read more about the validation here : 

https://academy.creatio.com/docs/developer/getting_started/develop_appl…

and more on asyncValidate here :

https://community.creatio.com/questions/lead-status-validation-0



Best regards,

Yurii. 

Show all comments