Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Remove the choices of currency type of field

Priyanka_77
Tera Contributor

I have a field of type currency. It has choices of INR,Euro, dollar,etc. Now i want only euro symbol, others i need to remove somehow. I cannot directly set these currencies to false. How to achieve this?

Attached is for reference.

1 ACCEPTED SOLUTION

Sid_Takali
Kilo Patron

Hi @Priyanka_77 Write a onLoad Client Script and use below code

Add your currency field name and modify script accordingly

 

    g_form.removeOption('currency_field_name.currency_type', 'CHF');
    g_form.removeOption('currency_field_name.currency_type', 'GBP');
    g_form.removeOption('currency_field_name.currency_type', 'JPY');
    g_form.removeOption('currency_field_name.currency_type', 'EUR');

 

 

This script will remove choices from Currency field specifically on field from one table not globally.

Sid_Takali_0-1719923867312.png

 

Please mark my answer Correct/helpful,

Regards,

Sid

View solution in original post

5 REPLIES 5

DineshSankar
Tera Contributor

I am not sure why the solution is to create the client script.  You should be able to set the currency to inactive in fx_currency table and that works in both native and workspace UI @elias_tefer