DWP Catalog: When submitting a request from Standard SRD imported in DWP Catalog, we see the error “ERROR (360): No currency conversion ratio exists for the requested conversion. It has been noted that by default, DWP catalog chooses USD as default currency. How can we change from the default currency code ? |
This knowledge article may contain information that does not apply to version 21.05 or later which runs in a container environment. Please refer to Article Number 000385088 for more information about troubleshooting BMC products in containers. On version 18.02 and 18.08, use below script to change the currency run this query on the tenant database: update myit_sb_TenantConfiguration set [DefaultCurrency]='AUD' +++++++++++++++++++++++++++++++++++++++++++++++++++++ To update the tenant currency please follow these instructions: Note: the commands use environment variables that are usually set on the server. Use hard coded values if the variables aren't set: 1. From the command line, switch to the rxscripts folder: cd $BMC_AR_SYSTEM_HOME/sb/rxscripts 2. Set the environment context: source ./bin/setenv.sh 3. Log in as the tenant admin: ./bin/login.sh hannah_admin@$rx_tenant_domain Passw0rd! 4. Get the correct guid of the tenant configuration record: export RECORD_ID=$(./bin/record_instance/find.sh recorddefinition=myit-sb:TenantConfiguration |jq -r '.data[]."379"') 5. Set the desired currency for the tenant configuration: export CURRENCY='GBP' 6. Generate the initial tenant configuration data: echo "{\"resourceType\":\"com.bmc.arsys.rx.services.record.domain.RecordInstance\",\"id\":\"$RECORD_ID\",\"displayId\":\"1\",\"recordDefinitionName\":\"myit-sb:TenantConfiguration\",\"permittedGroupsBySecurityLabels\":{},\"permittedUsersBySecurityLabels\":{},\"permittedRolesBySecurityLabels\":{},\"fieldInstances\":{\"6\": {\"resourceType\":\"com.bmc.arsys.rx.services.record.domain.FieldInstance\",\"id\":6,\"value\":\"2016-12-15T18:25:38.000Z\"} ,\"420003302\": {\"resourceType\":\"com.bmc.arsys.rx.services.record.domain.FieldInstance\",\"id\":420003302,\"value\":\"$CURRENCY\"} }}" > ./data/record_instance/tenant_config.json Note: Replace the date value above (2016-12-15) with the current date. In future you should just be able to update the currency by editing the script directly. 7. Run the update script and load the tenant configuration data. ./bin/record_instance/update.sh ./data/record_instance/tenant_config.json myit-sb%3ATenantConfiguration/$RECORD_ID 8. Restart the DWP Catalog Server (dwpcontroller stop/start) When you view the Cost and quantity page in the application, the tenant currency shall show the new currency. If the currency is not updated, there might be an error in the currency code you used. To test the configuration: While logged in as the tenant administrator from the previous section. 1.Run the command to check the tenant configuration ./bin/record_instance/find.sh recorddefinition=myit-sb:TenantConfiguration 2.Look for the field ID: 420003302 to check that the tenant currency was updated. **For MyIT SB 3.2 use the following procedure: You must be logged on as a server administrator to complete this process. 1) Copy the attached tenant_config_currency.json to the "<Service Broker Install Directory>sb/rxscripts/data/" directory 2) Modify the file so that the currency matches what the tenant currency should be (replacing USD in the attached file) 3) Open a command prompt to the "<Service Broker Install Directory>sb/rxscripts" directory and run these commands: source ./bin/setenv.sh ./bin/login.sh hannah_admin@<tenant identifier> password ./bin/record_instance/update.sh ./data/tenant_config_currency.json rxn%3A%2Fmyit-sb%2FTenantConfiguration/1 The script will complete without any response. If the operation is successful, the new currency should be visible in the Cost & Quantity panel in the MyIT Service Broker admin console after you refresh the browser. Notes: • The script will not trigger an error. Instead, the currency appears blank. • The script will fail if currency code is not valid. For reference, see https://en.wikipedia.org/wiki/ISO_4217 • Do not modify any other values in the tenant_config_currency.json script. • Each tenant can operate with only one currency at a time. • Existing service cost information will not be converted when you change tenant currency. |