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?

Report
All responses (
Answers (