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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Changing Currency on CRM Quote Sets Price List to 'Undefined'

(0) ShareShare
ReportReport
Posted on by

Since CRM 4.0, we have implemented JavaScript code to set Currency, Price List and a number of other fields based on the Potential Customer selected on a Quote.

When upgrading to CRM 2013, the JavaScript was modified to use the REST API and all continued to work successfully.

Since upgrading to CRM 2016, whenever the Currency get's changed, the user gets an alert: 'Review all the money fields in the form before you continue' and the Price List is set to 'Undefined', even though it had already been set by client side code.

Removing all custom code and testing the creation of a new Quote using the OOB experience, the same issue occurs.

The following screenshot is for a new Quote where the Currency has been changed from the base currency of Australian Dollar to US Dollar:

CRMUndefinedPriceList.PNG

Various attempts to work around this using JavaScript and the new 'GetDefaultPriceList' message and a PlugIn do not resolve this.

Is this a bug?  Has anyone else seen this?  Is there any workaround for this behaviour?

Thanks,

Phil.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nick.Doelman Profile Picture
    1,947 Most Valuable Professional on at

    I can reproduce this and its "by design".  

    A price list is assigned a currency, so when you change a currency on a quote, the price list that you had originally specified is no longer valid because the currency on the price list no longer matches the currency you specified on the quote.  So CRM clears out the price list field (and tells you to check your money fields...)

    Once you change the currency, you need to change the price list on the quote to one that has the same currency.

    So your code likely still works but you might need to review your price lists to make sure you have records that match the currency.

    Hope this helps.

    Cheers

    Nick

  • Community Member Profile Picture
    on at

    Hi Nick,

    Thanks for confirming that you can reproduce this, and it is like this OOB.

    The issue I have is that my code does work - it get's Currency and Price List from the Customer and sets those fields on the form.  However, when saving the Quote (automatic Saving is turned off), it Saves, but then runs it's "Review all the Money fields..." script and clears the Price List I have just set and goes and sets it to Undefined.

    If you then Close the form (and do not save at this point) you can open the saved Quote and the correct Price List has been saved.  This is driving Users mad, having to close and then open the Quote to then start entering additional data.

    In addition, if you Save and Close rather than just a Save, no "Review all the Money fields..." message appears, the Price List is not cleared and it saves and closes happily.  When re-opened, the correct Price List has been saved.

    So how do you stop it from clearing the Price List just set when trying to Save!

    This issue also occurs when creating a Quote from an Opportunity, but only when the Currency is not the Base Currency!

    Cheers,

    Phil.

  • Suggested answer
    Nick.Doelman Profile Picture
    1,947 Most Valuable Professional on at

    Hi Phil

    Gotcha.  It looks like that "helpful" message was added in a recent version.  Not sure how we can suppress it.   It most likely would be a javascript function call of some sort.  

    I haven't tried this and I don't know if it would work, but what I would try to run fiddler to see what the function name is.

    Then add a javascript to the form (or to the currency field) with the exact same function name that does nothing... CRM will run functions based on the last one loaded, so instead of running the out of the box "warnuser()" function it would instead run your custom one (with no prompt).  ("warnuser()" is *not* the name of the function... would need to hack a bit to figure that out)

    Its a bit of a radical idea and just spit balling right now...

    Cheers

    Nick

  • Community Member Profile Picture
    on at

    Hi Nick,

    It might be a radical idea, but at the moment, everything else I have tried hasn't worked!  I'll give this a go and see what happens.  I'll respond back with my findings.

    Cheers,

    Phil.

  • Community Member Profile Picture
    on at

    Did you manage to find a solution?

    I am setting currency field and price list field with javascript- after save my pricelist field is being cleaned - as if the system just noticed the change of currency and cleared the field.

    Any success in turning that mechanism off?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans