ConvertValue(Avalue, AfromCurr, AToCurr)
Converts a value from one currency to another.
Parameters
- AValue. Specifies the value to be converted.
- AFromCurr. Specifies the identifier of the currency to convert from. The currency must exist in the Curr_CurrencyID field of the Currency table, otherwise an error is returned.
- AToCurr. Specifies the identifier of the currency to convert to. The currency must exist in the Curr_CurrencyID field of the Currency table, otherwise an error is returned.
Return value
String containing the converted value formatted to the number of decimals specified for the currency in the AToCurr parameter.
Examples
Copy
var iValue;
var iFromCurr;
var iToCurr;
iValue = 50, 000;
iFromCurr = 1;
// Where 1 is the identifier of Euro.
iToCurr = 2;
// Where 2 is the identifier of British Pound.
CRM.AddContent("British Pound: " + CRM.ConvertValue(iValue, iFromCurr, iToCurr));
Response.Write(CRM.GetPage());
Converts 50,000 from Euro to British Pound.