Omit empty attributes in CREATEACCOUNTJSON of SAP

ASA
Regular Contributor
Regular Contributor

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.

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

Use undefined keyword

ASA
Regular Contributor
Regular Contributor

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}}"

 

Remove surrounding {}

ASA
Regular Contributor
Regular Contributor

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

 

Working for me

"E_MAIL": "${if(user.email != null && user.email?.length() > 0) {user.email} else {undefined}}"

 

ASA
Regular Contributor
Regular Contributor

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.

 

this is working in v5.5 hence raise freshdesk ticket

ASA
Regular Contributor
Regular Contributor

Ticket raised, will update here with solution. Thanks for the help.