Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Salesforce - Use of escape character in JSON

Varshi_Balaji
Regular Contributor
Regular Contributor

Hi Team,

We have a requirement in salesforec connector where we need to compare if user has a job description then make salesforce account active.
Example in json: "IsActive":"${if(user.jobDescription=='DIRECTEUR DAGENCE H/F'){true}else{false}}", - this is working.
if user has DIRECTEUR D'AGENCE H/F' job description,json is not validating. "IsActive":"${if(user.jobDescription=='DIRECTEUR D'AGENCE H/F'){true}else{false}}", - as there is an extra ' ,json is not valid.
We tried escape characters \', equals also (user.jobDescription.equals('DIRECTEUR DAGENCE H/F'),but this is not supporting in saviynt.

Can you please help us here

2 REPLIES 2

smitg
Regular Contributor III
Regular Contributor III

Hi @Varshi_Balaji 

Can you try with double slash \\ or triple \\\

Thanks,
Smitha

Varshi_Balaji
Regular Contributor
Regular Contributor

Hi ,

We tested and it was not wokring. We got one more solution - user.jobDescription.replace('\'', '')=='TEST' and this is working.

Regards,

Varshitha