Back in the day (I'm sure few of you remember) one would add validation script to buttons -- if the function returned true the button action continued else it would just stop.
In the ribbon it doesn't appear to have the same functionality. Looks like I can control button enablement via javascript but, not the firing of the action. E.g. Opportunity Create Order fires action of CloseAsWon. Is there a way to check a condition OnClick and have the action either proceed or be interrupted?
All I can see is how to check the condition -- and flash the alert -- on form load while using an enable rule. I.e. onLoad vs onClick.
Am I missing something?
TIA
-md
Here is the post that can help you - dynamics365blocks.wordpress.com/.../
With the handler I meant JS method that is called by the OOB button - so OOB JavaScript function.
Thanks AB. Sounds dangerous. Not sure I know how to call a handler.
Hello,
What you can do here - you can customize the command of the button, copy the handler that is being called and develop own function that do validation and call OOB handler if validation is passed. I did that for Close as Won/Close as Lost for Opportunity.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156