Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Calculate Price message

Posted on by 13,204 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
    Ammar Zaied 1,670 on at
    RE: Calculate Price message

    Check if the plugin must run on the update

  • meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: Calculate Price message

    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
    Ammar Zaied 1,670 on at
    RE: Calculate Price message

    Hi Mehdi,

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans