Hello,
I notice that CalculatePrice Plugin is fired on any load or refresh of an opportunity. Is that normal ?
So in this case, to cancel the plugin's execution, i added this code to my plugin
if ( context.ParentContext.messageName("Retrieve") ) {return;}
What do you think of this approach?
Best regards,
Mehdi El Amri
*This post is locked for comments
Check if the plugin must run on the update
yes sure !! but i don't understand why the calculatePrice is fired on this context ... Maybe to recalculate the estimated Value, for that purpose, i calculate this field when the opportunity line change.
Hi Mehdi,
yes, you can use the code, you can add "context.ParentContext != null &&" to condition.
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