
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-13-2021 03:43 AM
To set value to an FX Currency field from server-side(like script include, workflow, etc.), use the below sample code:
gr.salary.setDisplayValue('EUR;1000');
gr.update();
To set value to an FX Currency field from client-side(like client script), use the below sample code:
g_form.setValue('salary' , 'USD;1000');
gr is the GlideRecord object to your record that you want to update
salary is the sample field name in back-end,
EUR is the sample currency(Euros)
1000 is the sample amount
Note : In place of EUR, you can use USD / JPY / CHF / GBP
Long Live ServiceNow!
- 6,818 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This works fine!! Thank you so much 🙂

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
That's Nice
Excellent Article.
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
DevTools is a scoped application with many helpful scripts ready to be re-used.
The built-in currency conversion API object (GlideCurrencyConverter) is a bit tricky to use.
Here you can find a nice wrapper function for currency conversion based on the ServiceNow OOTB functionality: