Automatically trying to change the lead status through Code facing issue
We have added few stages in lead stage lookup and have assigned the stage number for the same. On Click of Qualify button the lead stage should change from 1st stage to the 2nd
var qualifystatusid = LeadConfigurationConst.LeadConst.QualifyStatus.Engage;
this.setQualifyStatus(qualifystatusid);
this.set("QualifyStatus","Engage");
On Click of qualify button i have implemented the above code. But it is not working.
Kindly help us resolve the same asap
Like
Dear Sri,
The lead qualification process is managed by business processes, which are triggered by the button click. You can override the button click method onLeadManagementButtonClick in the replacing lead schema to add any custom logic on button click, however this won't solve the lead stage issue if you are using basic lead qualification mechanism.
Please rather consider creating your custom version of Lead Management and Lead Qualification processes, which are responsible for the basic logic.
Regards,
Anastasia
Anastasia Botezat,
Dear Anastasia,
I have Overriden the button click logic. I have a business process that gets triggered and creates a contact and account. At the end of the process i am modifying the lead stage. The change happens on hard reload of the page. Is there a way to do it without hard reload of the page?
Kindly help me with the same asap
Regards,
Saranya
Dear Sri,
You can use this marketplace application so not to reload the page to see changed data, but only clicking on the button that appears after application installation https://marketplace.bpmonline.com/app/refresh-data-button-bpmonline.
Best regards,
Oscar
Oscar Dylan,
Dear Oscar,
We don't want any market place app to be installed. we are looking for a solution to be resolved through code.
Kindly help us resolve the same
Thanks & Regards,
Saranya
Sri Saranya,
Business process is a back-end logic, therefore, you need to reload browser for changes to be displayed. However, you can transfer the logic of changing status to the client side. In order to do so, you can add a custom method to the page (LeadPageV2), indicate custom method as a click handler (button property in diff block of the page) and proceed with stage change in this method.
Regards,
Anastasia