RE: Alert message after the opportunity is won
Hi HimaM,
I tried many ways to do this but both of them didn't work.
1. I created a custom field first named "new_copyStatus" and then I created a workflow to set the "new_copyStatus" field value to "Won" when winning the opportunity.
Then I add a js code to alert the message to the "Onchange" event of "new_copyStatus" field on the opportunity form. But after a test, it didn't work :(.
So we know that if we update the field through workflow, it will not trigger the "Onchange" event on the form.
2. I added a js code to judge if the status is "Won", then alert the message when onloading the form because I find that when the opportunity finish the win process, the page will be reloaded. I tried this function but it still did not work. Then I found that when the opportunity finish the process and reload the page, it only do asynchronous update, not Synchronous which means it will not refresh the form so that the function of form "Onload" will not be triggered.
I think that the "Win" process is a workflow which works in the background, but showing message on the form could only be done by js code. We could not trigger js code through workflows. So I'm sorry that there doesn't seem to be a way out right now.
Hope it helps.
Best Regards,
Leo