Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Enable Account for SAP Service Account Error

AashishD
Regular Contributor II
Regular Contributor II

Hi,

We are trying the enable account on a SAP OOTB connector, however we get an error message:

Code:

"CLASS": "${if(ServiceAccountOwnerMap.get("ServiceAccountType") == 'L')? 'REFERENCE' : 'SUPER'}",

Error: Error while enableAccountSAP - No such property: ServiceAccountOwnerMap for class: SimpleTemplateScript103.

ServiceAccountOwnerMap works while in create account json.

Any recommendations?

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

accountsObj.accountType


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

AashishD
Regular Contributor II
Regular Contributor II

Hi,

Adding this neither gives any error nor completes the task. On removing this, the task got completed.

arsTaskObj.accountKey.accountType


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

AashishD
Regular Contributor II
Regular Contributor II

Hi Rushi,

This does not work either. I even tried 

"CLASS":"${if(task?.accountKey.accountType == 'L')? 'REFERENCE' : 'SUPER'}" but it didnt work.

However, on hardcoding the task got completed. Strangely, there is no error in logs that could be fetched

It seems variables are not supported Please raise support ticket to get confirmed


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

AashishD
Regular Contributor II
Regular Contributor II

Hi,

 The below worked: I guess the 'if' keyword was causing an issue

"CLASS":"${account?.accounttype=='L'?'REFERENCE':'SUPER'}",

You can also give like this if any default class

"CLASS":"${account?.accounttype === 'L' ? 'REFERENCE' : (account?.accounttype ? 'SUPER' : 'DEFAULT_CLASS')}",


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.