microsoft dynamics crm 2015 Error in javascript string concatenation -
i need concatenate 2 strings make useful link. code goes here:
odatahost = "https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/"; accountid= "{90639159-6e01-e511-80ed-c4346bada644}"; odataquery = "accountset(guid'" + accountid + "')"; odataurl= odatahost + odataquery; odataurl not forming meaningful link , distorted. link formed is: https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(guid'{90639159-6e01-e511-80ed-c4346bada644}') ,but last characters of resulting string i.e }') not part of resultant string makes distorted link. have tried: odatahost = odatahost.concat(odataquery) didn't worked. please come suitable solution .
you need remove {}, going this:
https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(guid'{90639159-6e01-e511-80ed-c4346bada644}') to this
https://xyz.dynamics.com/xrmservices/2011/organizationdata.svc/accountset(guid'90639159-6e01-e511-80ed-c4346bada644')
Comments
Post a Comment