Get Currency symbol based on currency ID

Today I saw one post in MS CRM development forum, where user needs to get currency symbol based on currency id, so thought to write this post to help. you can use below code to get currency symbol based on currency id

function GetCurrencySymbol() {

    var CurrencyID = Xrm.Page.getAttribute(“transactioncurrencyid”).getValue()[0].id;
    var context = Xrm.Page.context;
    var serverUrl = context.getServerUrl();
    var ODataPath = serverUrl + “/XRMServices/2011/OrganizationData.svc”;
    var retrieveCurrency= new XMLHttpRequest();“GET”, ODataPath + “/TransactionCurrencySet(guid'” + CurrencyID+ “‘)”, false);
    retrieveCurrency.setRequestHeader(“Accept”, “application/json”);
    retrieveCurrency.setRequestHeader(“Content-Type”, “application/json; charset=utf-8”);
    retrieveCurrency.onreadystatechange = function() {

function retrieveCurrencyCallBack(retrieveCurrency) {
    if (retrieveCurrency.readyState == 4 /* complete */) {
        if (retrieveCurrency.status == 200) {

            var retrievedParent = this.parent.JSON.parse(retrieveCurrency.responseText).d;



 Enjoy !!!


Leave a comment

Filed under MS CRM 2011

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s