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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Quote Activation removes value of custom field

(0) ShareShare
ReportReport
Posted on by

Hi

I have a custom field called Approved Amount which is a readonly field on the quote entity. When the quote is approved in draft state a business rule sets the approved amount field to the total amount of the quote.  When the quote is activated the value saved in Approved Amount somehow vanishes/resets. There is no business rule to reset this value. What could be causing this issue?

*This post is locked for comments

  • Verified answer
    Hosk Profile Picture
    on at
    RE: Quote Activation removes value of custom field

    Basically you cannot save read only fields because on the CRM form because in CRM it only changes saves fields which have changed and read only fields are do not set dirty/changed.

    So what you need to do is set the SubmitMode("always") if you change a field to read only.  This is saying to the CRM form this field can be changed and we should write the values back to the database.  

    You would need to set the fields SubmitMode on the javascript onload

    Xrm.Page.getAttribute(“fieldname).setSubmitMode(“always”);

  • Austin Saldanha Profile Picture
    on at
    RE: Quote Activation removes value of custom field

    Thanks, Guido... will try this and update you.

  • Austin Saldanha Profile Picture
    on at
    RE: Quote Activation removes value of custom field

    Thanks, Ben... both you and Guido have given some reasonable insight about business rules. Let me try this and let you know.

  • Verified answer
    Austin Saldanha Profile Picture
    on at
    RE: Quote Activation removes value of custom field

    I took some inspiration from the inputs given by both Guido and Ben.

    I modified the properties of the Approved Amount form field to editable and tweaked the Business Rules to locking the field during draft mode for regular users and unlocking it for the approving user. Now when the approving user activates the quote it saves the value in the field.

    Thank you both!!!!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans