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

Update account JSON not working as expected

AJ23494
New Contributor II
New Contributor II

Hi experts  , 

I have the below requirement

If customproperty65 =DM and customproperty64 = today's date 
then set extensionattribute 7 = secondary 

i tried the following logic but no luck , please suggest 

{
"objects": [{
"objectClasses": [
"user",
"top"
],
"distinguishedName": "${account.accountID?.replace('\\', '\\\\')?.replace('/', '\\/')}",
"attributes": {

${user.customproperty65 == 'DM' && user.customproperty64 == Calendar.getInstance().getTime().format('yyyy-MM-dd') ? '' : '"extensionAttribute7": "' + 'Secondary' + '",'}
"userAccountControl": "${account.customproperty24.toInteger()}",
${user.middlename == null ? '' : '"initials": "' + user.middlename + '",'}
${user.street == null && user.customproperty19 == null ? '' : '"streetAddress": "' + (user.street==null?'':user.street) + (user.customproperty19==null?'':', ' + user.customproperty19) + '"'}
}
}]
}


Also , is there a compiler available to check it beforehand or it can only be done on hit try basis

4 REPLIES 4

AJ23494
New Contributor II
New Contributor II

rushikeshvartak
All-Star
All-Star

What is date format of cp64


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

AJ23494
New Contributor II
New Contributor II

same i.e.  YYYY-MM-DD

AJ23494
New Contributor II
New Contributor II

The Task gets completed successfully but the extensionattribute7 value is not updated . Looks like a logical / syntax error 

Please suggest