Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Updating currency symbols on money fields with supported JavaScript code?

Posted on by Microsoft Employee

Hi All,

I need to set the currency in an opportunity to the associated account's currency.  I am able to update the currency field (transactioncurrencyid) with JavaScript code, but it is not updating the currency symbols on all of the money fields in the form.  Is there supported JavaScript code that will allow me to do this?

Thanks in advance.

*This post is locked for comments

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Updating currency symbols on money fields with supported JavaScript code?

    Hi Ben,

    You need to use below to asynchronously refresh and save the data which changes the symbol to the correct one.

    Xrm.Page.data.refresh(true);

    dyn365apps.com/.../how-to-change-currency-and-currency-symbol-using-javascript

  • Suggested answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: Updating currency symbols on money fields with supported JavaScript code?

    This is a known behavior - you can trigger a form save after changing currency. This will change the currency sign - but will commit the change as well.

    use Xrm.Page.data.entity.save();

    Thanks,

    PS

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Updating currency symbols on money fields with supported JavaScript code?

    Hi Ben,

    Thank you for your suggestion.  I just tried your suggestion and it still did not update the currency symbols.

  • Suggested answer
    Ben John Profile Picture
    Ben John 559 on at
    RE: Updating currency symbols on money fields with supported JavaScript code?

    Hi Benjamin,

    try this after your update: Xrm.Page.getAttribute("transactioncurrencyid").fireOnChange();

    Regards,

    Ben

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans