- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2025 01:15 AM
Hello Experts,
I am tring to the load the data of cost using transform map in tco module, but cost value is empty. Cost field type is fx currency.
Could you help in this case.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 12:47 AM
In field map of cost field ,use source script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2025 03:25 AM
Hello @Swapnil Meshram
You cannot directly update a currency field programmatically in ServiceNow due to some out-of-the-box (OOB) validations and business rules that are enforced on currency fields. These validations ensure consistency and accuracy, especially when currency conversions and formatting are involved.
Instead, ServiceNow manages currency field data using the fx_currency2_instance table. This table stores detailed currency-related information for each record where a currency field is used, such as the amount, currency code, and exchange rate.
So, if you're inserting or updating a record with a currency field through a script or integration, you also need to create a corresponding record in the fx_currency2_instance table. This ensures that the currency data is properly linked and rendered on the form, and that all backend processes relying on currency logic continue to function correctly.
Please refer the below script logic for this and you make changes accordingly in your transform map script as well and also you can run this background script to update the currency after uploading the data (just testing purpose)
you need two thing first is table name and second is record id that's mapped to parent_record fields.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 12:47 AM
In field map of cost field ,use source script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 12:52 AM
This is a common challenge in ServiceNow when dealing with fx_currency fields in Transform Maps.
If you're using a script in your field map, you might be attempting to directly set the fx_currency field as a single string or number, which won't work.
You need to set the fx_currency field using a string concatenation that combines the currency code and the amount, separated by a semicolon. The format is typically currency_code;amount.