function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

String received from API call with field values for a URL redirect.

Basically i have a lightning component that makes a API call to a third party server, on complete the server sends back the structure of what the URL needs to be for a URL redirect.

data the returns from API call ={!Account.Customer_Number__c}?case={!Case.CaseNumber}&contacttype=RestLinkFromSalesforce

but sometimes it sends

data the returns from API call https://test2/viewcust/AccessDetails/{!Account.Number}?case={!Case.Owner}&contacttype=RestLinkFromSalesforce

It changes depending on the account. So basically it's already concatenated....

I was thinking maybe in the JS handler i could do

var  conc = data the returns from API call

and have the string from the API call be send like 

'https://test2/viewcust/AccessDetails/' + '{!Account.Number}' + '?' + 'case=' + "{!Case.Owner}' + '&' + 'contacttype' + '=' + 'RestLinkFromSalesforce'

as the format the data comes in is like this


I could just have the guys on the middleware system send over the string like that..... would it work and is there an easier way