and more in a single search tool across platforms. Read the announcement here. |
03/30/2023 07:42 AM
Hello,
Encountering error with a few lines in an update account usecase.
The code is sort of this:
{${if(task?.accountKey.customproperty10 == '')
'"givenname" : "'+user?.firstname+'",
"flags": "'+user.employeeType=='Industrial'? '2':user.employeeType=='Commercial'? '1':''+'",'
else
'"accountExpires": "'+user?.getEnddate().toInstant().toEpochMilli()-(-11644494808000)*(10000):'9223372036854775807'+'",
"sn" : "'+user?.lastname+'",'
}}
Here, flags and accountexpires are throwing a syntax error when I am trying to use them this way. Does anyone know an alternate way to write those lines?
Thank you,
Seemran Biswal
Solved! Go to Solution.
04/03/2023 01:41 AM
Please consider using the following code:
{
${if (task?.accountKey.customproperty10 == '')
'"givenname" : "'+user?.firstname+'",
"flags": "' + (user.employeeType=='Industrial'? '2' : (user.employeeType=='Commercial'? '1' : '')) + '",'
else
'"accountExpires": "' + (user?.getEnddate()?.toInstant()?.toEpochMilli() - (-11644494808000 * 10000)) + '",
"sn" : "'+user?.lastname+'",'
}
}
We kindly request you to verify this code and inform us if any further assistance is required.
04/10/2023 10:08 AM
Hello,
Thank you for this code; it worked.
Thanks!
04/10/2023 11:11 AM
Thanks for the Update.