Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/07/2024 11:28 PM
Hey,
We are trying to set default manager id in create account Json for Salesforce.
Below Json we are using, but account is not getting provision.
"ManagerId": "${ if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == '' ){"0053M000003DEGXQA4"} else {managerAccount?.accountID} }"
We are getting below error in pending tasks-
Error in user creation errorCode: INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTmessage: Site: bad value for restricted picklist field: null
Is there nay other way to add the correct json for this.
Thanks,
Aman
10/07/2024 11:53 PM
"ManagerId": "${managerAccount == null || managerAccount.accountID == null || managerAccount.accountID == '' ? '0053M000003DEGXQA4' : managerAccount.accountID}"
10/07/2024 11:55 PM
@akumar98 try this
"ManagerId": "${ if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == '' ){'053M000003DEGXQA4'} else {managerAccount.accountID}}"
10/08/2024 12:24 AM
Still we are getting the same error while provisioning
error- Error in user creation errorCode: INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTmessage: Site: bad value for restricted picklist field: Shamokin
Shamokin is the city value for the user we are giving and create account json is like this-
{
"Username": "${user.email.concat('.GHB')}",
"Alias": "${user.firstname.toString().substring(0,1)}${user.lastname.toString().substring(0,4)}",
"LastName": "${user.lastname.concat(' GHB')}",
"FirstName": "${user.firstname}",
"Email": "${user.email}",
"IsActive": true,
"Title": "${user.jobcodedesc}",
"Site__c": "${user.city}",
"TimeZoneSidKey": "America/New_York",
"LocaleSidKey": "en_US",
"ReceivesInfoEmails": true,
"ReceivesAdminInfoEmails": true,
"CI_CignaLANId__c": "${user.customproperty1}",
"EmailEncodingKey": "ISO-8859-1",
"LanguageLocaleKey": "en_US",
"EmployeeNumber": "${user.employeeid}",
"ProfileId": "${profileId}",
"ManagerId": "${managerAccount == null || managerAccount.accountID == null || managerAccount.accountID == '' ? '0053M000003DEGXQA4' : managerAccount.accountID}",
"FederationIdentifier": "${user.employeeid}"
}
Thanks
10/08/2024 12:36 AM
@akumar98 does that object value exist in Salesforce ?
Shamokin?
10/08/2024 12:37 AM
We are setting that value under Site__c attribute by passing it from saviynt.
10/08/2024 12:39 AM - edited 10/08/2024 12:39 AM
@akumar98 yes understood that .. I was referring in Salesforce, does that value exist?
Also try by passing any other city.
10/08/2024 12:52 AM
We don't have the access to Salesforce end. we are setting the attribute Site__c to user.city.
We also tried passing other city value but getting the same error.
Error in user creation errorCode: INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTmessage: Site: bad value for restricted picklist field: Shamokin
10/08/2024 12:56 AM
@akumar98 issue on target end .. check with Salesforce team.
10/08/2024 12:58 AM
Thanks for that.
Also how can we check the uniqueness on the FederationIdentifier when creating the account, and if the EID value is taken, set it to email?
10/08/2024 12:40 AM
@akumar98 try
{
"Username": "${user.email.concat('.GHB')}",
"Alias": "${user.firstname.toString().substring(0,1)}${user.lastname.toString().substring(0,4)}",
"LastName": "${user.lastname.concat(' GHB')}",
"FirstName": "${user.firstname}",
"Email": "${user.email}",
"IsActive": true,
"Title": "${user.jobcodedesc}",
"Site__c": "${user.city}",
"TimeZoneSidKey": "America/New_York",
"LocaleSidKey": "en_US",
"ReceivesInfoEmails": true,
"ReceivesAdminInfoEmails": true,
"CI_CignaLANId__c": "${user.customproperty1}",
"EmailEncodingKey": "ISO-8859-1",
"LanguageLocaleKey": "en_US",
"EmployeeNumber": "${user.employeeid}",
"ProfileId": "${profileId}",
"ManagerId": "${ if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == '' ){"0053M000003DEGXQA4"} else {managerAccount?.accountID} }",
"FederationIdentifier": "${user.employeeid}"
}
10/08/2024 12:53 AM
Hey raghu, we have tried the same json in our existing create account json and still we are getting the same error.
Error in user creation errorCode: INVALID_OR_NULL_FOR_RESTRICTED_PICKLISTmessage: Site: bad value for restricted picklist field: Shamokin
10/08/2024 01:15 AM
@akumar98 check with Salesforce team once,
FederationIdentifier value for email use below
"FederationIdentifier":"${user?.getEmail()}"
10/08/2024 01:30 AM
Hey raghu,
Thanks for the response.
Our requirement is like this-
Some users will have multiple Salesforce accounts. If they do, their first FederationIdentifer will be their EID, and their second FederationIdentifier will be their email. Is there a way to check for uniqueness on the FederationIdentifier when creating the account, and if the EID value is taken, set it to email?
10/08/2024 10:16 AM
"ManagerId": "${ (managerAccount != null && managerAccount.accountID != null && managerAccount.accountID != '') ? managerAccount.accountID : '0053M000003DEGXQA4' }"