You need to sign in to do that
Don't have an account?
enossir
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 = https://test1.com/viewcust/AccessDetails/{!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
http://<SERVER_URL>/viewcust/AccessDetails/<ALTCUST_ID>?<FIELD1_NAME>=<FIELD1_VALUE>&<FIELD2_NAME>=<FIELD2_VALUE>
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
data the returns from API call = https://test1.com/viewcust/AccessDetails/{!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
http://<SERVER_URL>/viewcust/AccessDetails/<ALTCUST_ID>?<FIELD1_NAME>=<FIELD1_VALUE>&<FIELD2_NAME>=<FIELD2_VALUE>
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