Salesforce -CreateAccount JSON : Dynamic Attribute condition issue

IAM_99
Regular Contributor II
Regular Contributor II

Hi All,

We have couple of Dynamic attributes in Salesforce - while evaulating a condition in Create Account JSON it always goes to else block- what s wrong with the below condition.

 

${if((requestAccessAttributes.get('cpqprofilerequired').toString()=='TRUE' || requestAccessAttributes.get('cpqprofilerequired').toString()== 'true') && requestAccessAttributes.get('CPQ_Profile')=='Full Access - Admin') {'a1Q7c000006zmrAEAQ'} else if((requestAccessAttributes.get('cpqprofilerequired').toString()== 'TRUE' || requestAccessAttributes.get('cpqprofilerequired').toString()== 'true') && requestAccessAttributes.get('CPQ_Profile')=='Full Access - Sales') {'a1Q7c000006zmrKEAQ'} else {''} }

2 REPLIES 2

sahil
Saviynt Employee
Saviynt Employee

Can you try to use eq in place of = and see if it works. Also, I would suggest to start with just 1 condition to verify if it works and then move to multiple condition clause. 


Regards,
Sahil

IAM_99
Regular Contributor II
Regular Contributor II

it didnt work  equals also. since it was giving null all the time .

We have mapped with account cp property ( cp2) in the DA and then it worked with below..

requestAccessAttributes.get('customproperty2')