Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/03/2024 08:08 AM
Hii Team,
I have try following syntax for comapre the enddate with current date if end date is pass away to current date then update user cp40 to Ending Today.
"httpParams": "{\"username\":\"${user.username}\",\"customproperty40\":\"${if(user.statuskey==0 ) {'Leaver'}else if{(user?.enddate<=(Calendar.getInstance().getTime()))?'true':'false'} else (user.leaveStatus.equals('1')) {'On Leave'}}\"}",
I try this syntax but getting error
{"Disable User":{"headers":null,"message":{"errorCode":"0","message":" User Updated Successfully"},"statusCode":200,"description":null,"status":"Failed"}}
Please suggest the syntax for this, it will greate help for me.
06/03/2024 10:45 AM
Can you share logs
06/03/2024 11:27 PM
I attach the logs here,
06/03/2024 11:46 PM
Share in text file
06/03/2024 11:52 PM
06/04/2024 12:16 AM
I try following syntax for the compare date:
1. ${Date.parse("dd-MM-yyyy", user.customproperty1)>(new Date())?user.customproperty1:(new Date().format("dd-MM-yyyy"));}
2. ${Date.parse("dd-MM-yyyy", user.customproperty1)>(java.util.Calendar.instance.time)?user.customproperty1:(java.util.Calendar.instance.time.format("dd-MM-yyyy"));}
3. {(user?.enddate<=(Calendar.getInstance().getTime()))?'true':'false'}
still same error - {"Disable User":{"headers":null,"message":{"errorCode":"1","message":" Users not found with username ${user.username}"},"statusCode":412,"description":null,"status":"Failed"}}