web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Active Discussion

Calculate Price message

(0) ShareShare
ReportReport
Posted on by 13,218 User Group Leader

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

  • Ammar Zaied Profile Picture
    1,670 on at

    Hi Mehdi,

    yes, you can use the code, you can add "context.ParentContext != null &&" to condition.

  • meelamri Profile Picture
    13,218 User Group Leader on at

    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.

  • Ammar Zaied Profile Picture
    1,670 on at

    Check if the plugin must run on the update

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans