Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to pass ProfileID in if else Logic for Salesforce OOTB Connector

Bhargavi3
New Contributor III
New Contributor III

Hi Team,
Could someone pls check  the below line is correct or wrong?
In Salesforce OOTB Connector document we have like this , "ProfileId": "${profileId}"
As per our requirement I written like below:

 "ProfileId": "${(user?.comments == 'Workday Imported') ? profileId : user.customproperty15}",

else part is triggered when I created user for salesforce through form, but when I trying with ARS page for internal user having comments is Workday Imported getting below error

Error in user creation errorCode: MALFORMED_IDmessage: Profile ID: id value of incorrect type: null

Thanks,
Bhargavi Padaraju.

5 REPLIES 5

NM
Honored Contributor III
Honored Contributor III

@Bhargavi3 what value do you have to pass when comment is equal to workday imported.

Sample 

 "ProfileId": "${(user?.comments == 'Workday Imported') ? 'profileId' : user.customproperty15}",


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Bhargavi3
New Contributor III
New Contributor III

Hi @NM,

We have two scenarios here:
Internal Users and external users
Internal users will raise a request from ARS page and salesforce OOTB connector will take profile id automatically.
For external users, we created Dynamic attribute in user form, from there user will select profile id and we are storing in cp15 and passing in connector.
comments ="Workday imported" is internal users' scenario.

Thanks,

Bhargavi Padaraju.

NM
Honored Contributor III
Honored Contributor III

@Bhargavi3 for internal users it will automatically take profile ID so you have to map it to a property right?


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

What is value stored in cp15 ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Raghu
All-Star
All-Star

@Bhargavi3  add null handling check it , i belive user.cp15 have value?

try below

"ProfileId": "${(user?.comments == 'Workday Imported') ? profileId : (user?.customproperty15 !== null ? user.customproperty15 : '')}"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.