Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
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.
Hi Leo & David,
My requirement was not possible using alert messages so i created a HTML webresource with the messages for won and lost and enabled these using JS using setVisible condition when the opportunity is won or lost.
Thank you for your suggestions.
Have a good day.
I'm so glad to hear that you have resolved your problem and thank you very much for sharing the solutions.
Business Applications communities