function getEuroExchangeRate(executionContext) {
var formContext = executionContext.getFormContext();
//Retrieve record
Xrm.WebApi.retrieveRecord("transactioncurrency", "e97e1a46-4e59-e811-8148-000d3a06499e", "?$select=exchangerate").then(
function success(result) {
console.log(result);
// Columns
var transactioncurrencyid = result["transactioncurrencyid"]; // Guid
var exchangerate = result["exchangerate"]; // Decimal
var exchangerate_formatted = result["exchangerate@OData.Community.Display.V1.FormattedValue"];
//update field
formContext.getAttribute("abc_euroexchangerate").setValue(exchangerate);//abc_euroexchangerate should be logic name of the field
},
function (error) {
console.log(error.message);
}
);
}
Daivat Vartak (v-9d...
671
Super User 2025 Season 1
Vahid Ghafarpour
167
Super User 2025 Season 1
Muhammad Shahzad Sh...
138
Most Valuable Professional