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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Strange Issue With Plugin Not Updating Values Except When Debugging

(0) ShareShare
ReportReport
Posted on by 129

I have a weird issue where a value updated by a Plugin only seems to get updated when the debugger is on. Below is the code. 

Opportunity gl_opp = new Opportunity();

gl_opp.Id = opportunity.Id;
gl_opp.gl_IntroductionOfferTotalDiscount = new Money(introTotal);
gl_opp.gl_PCODiscountVariance = new Money(floorVariance);
gl_opp.gl_PCOTargetVariance = new Money(targetVariance);

service.Update(gl_opp);

The value that is not being set is gl_opp.gl_IntroductionOfferTotalDiscount = new Money(introTotal);

However if I profile the plugin and run the profile through VS debug I can see that a value is being set for the attribute and when it goes through the debugger it actually saves the values in Dynamics. 

Anyone know what might be causing this?

 

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Can you remove profiler if it is installed on your crm instance.

    Also, Enable trace log and see if any error is getting logged. This is sync or async plugin?

    All other fields value are getting saved in normal execution?

    Check if gl_opp.gl_IntroductionOfferTotalDiscount = new Money(introTotal); is getting changed from any other plugin/custom code.

    Enable audit history for this  field and Check auditing log.

    If found helpful, Please mark my answer verified.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 98 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans