Notifications

1042 views

Description

When a currency field is updated via client script using g_form.setValue(field_name, value);, the currency code is not set to the session currency, but to US dollars (USD).

Steps to Reproduce

 

  1. Do one of the following with the currency setting:
    • log in as a user with a local currency other than USD
    • open a record with a value in currency other than USD
    • manually set the field value to a currency other than USD
  2. Execute a client script that sets the value on a currency field using g_form.setValue(field_name, value);.
    Note that the currency is changed to USD. The session currency, or the currency that is currently set on the field, shoudo be preserved.

 

Workaround

Instead of scripting to set the value only, the setValue should be used to set the display value in the required currency and another line should be added to force the required currency to display.

Consider the following code:

g_form.setValue(field_name, currency_code+';'+currency_amount);
g_form.setValue(field_name+'.currency', currency_code);

Note: The order here is very important - the last line should be the one to force the required currency to display.


Related Problem: PRB742211

Seen In

Kingston

Fixed In

Istanbul Patch 11 Hot Fix 1
Jakarta Patch 2 Hot Fix 3
Jakarta Patch 4
Kingston

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-10-09 08:08:26
Published:2017-08-07