Currency type filed

eyal abu hamad
Mega Sage

hey, I want to update the currency symbol via script but it dose not allow me. instead it automatically parse the value to specific Currency. how can I change the Currency symbol ?

2 ACCEPTED SOLUTIONS

Viraj Hudlikar
Giga Sage

Hello @eyal abu hamad 

 

You need to set it like this

var currencyCode = 'EUR';
current.currencyTypeField.setValue(currencyCode + ";" + convertedValue);

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

View solution in original post

Kieran Anson
Kilo Patron

To set the value of currency in a different currency to the user's, you can set the value with a prefix currency code value.

 

For example, if I wanted to set the total_cost field to a specific value I would do the following:

current.setValue('total_cost' , 'GBP;' + '499.99')

Further details can be found on the docs site

View solution in original post

6 REPLIES 6

Hi,

In the link I provided, you can see a number of methods you can use to retrieve a currency value.

getValue will return it in the session value. Because you're running a background, that will be your currency.

 

getReferenceValue might be what you want to use. However you've not explained what you are technically trying to achieve....so there might be another option.

Manmaya Kumar S
Tera Expert

Setting fx_currency type field's values happen a bit differently, we are supposed to use gr.field_name.setValue('TYPE;AMOUNT');

for ex gr.u_project.setValue('INR;20000');
the ';' is important.

try like this and it will work.

Thanks!