01-25-2023 03:42 AM
Is there a way to not provision empty attributes in CREATEACCOUNTJSON in SAP connector?
I'm looking for the same behaviour as SAVIYNTNOTCHANGED keyword in UPDATEACCOUNTJSON or SUPPORTEMPTYSTRING option in AD connector.
01-25-2023 04:12 AM
Use undefined keyword
01-25-2023 04:18 AM
Already tried that. If I'm using that we are always getting syntax errors:
Error while createAccountSAP - No such property: undefined for class: SimpleTemplateScript1339
e.g. for
"E_MAIL": "${if(user.email != null && user.email?.length() > 0) {user.email} else {undefined}}"
01-25-2023 04:20 AM
Remove surrounding {}
01-30-2023 01:36 AM
Doesn't work either:
"E_MAIL": "${if(user.email != null && user.email?.length() > 0) {user.email} else undefined}"
Leads to:
Error while createAccountSAP - No such property: undefined for class: SimpleTemplateScript2655
01-30-2023 09:56 PM - edited 01-30-2023 09:57 PM
Working for me
"E_MAIL": "${if(user.email != null && user.email?.length() > 0) {user.email} else {undefined}}"
01-30-2023 11:44 PM
Tried once more with exactly copying yours, just to be sure:
Error while createAccountSAP - No such property: undefined for class: SimpleTemplateScript2263
Do you by any chance know if this might not be available in 2021.0 yet? Otherwise I would open a ticket.
01-31-2023 03:56 AM
this is working in v5.5 hence raise freshdesk ticket
01-31-2023 05:52 AM
Ticket raised, will update here with solution. Thanks for the help.