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)

Opportunity Price List Removed after Create (unsaved changes message)

(0) ShareShare
ReportReport
Posted on by 115

Hello,

I have an issue with the opportunity entity. When it is created, normally the Price List is prefilled in the script, but after saving it gets removed and I get "Unsaved Changes" message (see screenshot)

9848.png

There are no scripts that are executed after save, and we do have a plugin that is triggered on Pre Create event, but I also debugged it and it doesn't have an impact on Price List.

Does anyone have an idea what might be happening that causes this?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Opportunity Price List Removed after Create (unsaved changes message)

    I faced the same issued. In Opportunity, Revenue is defaulted as UserProvided and PriceList is null. Whenever I save a new Opportunity, the form remain unsave changes because of PriceList field. I've tried with Revenue as System Calculated and fill the Price List, Price List was saved to DB as I selected, but the same, unsave changes occours on form after save.

    As a solution, as I don't want to use priceList for the time being, changed the setSubmitMode for Price List Field as Never. 

    Here is the javascript code on formLoad

    Xrm.Page.getAttribute("pricelevelid").setSubmitMode("never");

     


    I don't know whether it is the proper solution or not, but it's solved for the time being.

    If someone find any proper solution, reply please.. 

    Thank you.

  • tayapr Profile Picture
    165 on at
    RE: Opportunity Price List Removed after Create (unsaved changes message)

    Hey Denis,

    I don't have a solution yet but wanted to let you know you are not alone in facing this issue.

  • deno43 Profile Picture
    115 on at
    RE: Opportunity Price List Removed after Create (unsaved changes message)

    There are no business rules on the form.

    There are plenty of scripts onload and onsave event which do hide/save alongside with other stuff, but none of these scripts removes a value.

    Regarding setSubmitMode - why do you think this would help? The value is removed after save (not before save) - because I get "Unsaved changes" error.

    Is there some kind of CRM built-in logic that could cause this?

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Opportunity Price List Removed after Create (unsaved changes message)

    Not sure what business logic you have in the form, there should have some business logic which is clearing the field.

    Could you please check following

    - Is there any business rules having in the form related to that field .

    - check is there any script in the onload and onsave event.

    - Try to do field setsubmitmode always in the onload event  

        Xrm.Page.getAttribute(fieldId).setSubmitMode("always");

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans