Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

JS - Convert a number or currencies to words

Posted on by 873

Hello,

I would like to convert numbers or currency fields to words using JS or plugins.

For example: If the total cost is 10,000$, a JS should be triggered and set the value of the field in the form to Ten thousand Dollars.

The below API achieves what I am looking for but I am wondering if we could have a native function instead of the API:

https://github.com/BitWeb/number-to-words-api

We might have the total cost value in different currencies (Australian, Canadian, etc..)

How would you suggest achieving the above requirements? Can you provide an example?

Any help is greatly appreciated.

Best regards,

EBMRay

  • Suggested answer
    XM-22040801-0 Profile Picture
    XM-22040801-0 11 on at
    RE: JS - Convert a number or currencies to words

    Hi,

    I recommend you to do it in plugin (C#) rather than in JS.

    I invite you to have a look at this post which shows how to do it in C# : stackoverflow.com/.../converting-numbers-in-to-words-c-sharp

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

Product updates

Dynamics 365 release plans