Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to accses account custom attributes in Email template

sampath18
Regular Contributor II
Regular Contributor II

Hi All,

I have created an email template and attached it to endpoint, expected to get an email when the task is completed

I wanted to get account cp31 and 32 where the response attributes of the create account is mapped.

so i added ${account.customproperty32},${account.customproperty33}. But i got error saying below.

can anyone confirm if this possible as i saw some of the account attributes can be used.

Error:

java.lang.NullPointerException: Cannot get property 'customproperty32' on null object at SimpleTemplateScript100.run(SimpleTemplateScript100.groovy:1) at com.saviynt.utility.TemplateUtilityService.getSimpleTemplateString(TemplateUtilityService.groovy:79) at com.saviynt.utility.TemplateUtilityService.getTemplateString(TemplateUtilityService.groovy:37) at com.saviynt.ecm.services.ArsTaskService$_sendTaskCompletionEmail_closure170_closure344_closure346.doCall(ArsTaskService.groovy:14139) at com.saviynt.ecm.services.ArsTaskService$_sendTaskCompletionEmail_closure170_closure344.doCall(ArsTaskService.groovy:13911) at com.saviynt.ecm.services.ArsTaskService$_sendTaskCompletionEmail_closure170.doCall(ArsTaskService.groovy:13827) at com.saviynt.ecm.services.ArsTaskService.sendTaskCompletionEmail(ArsTaskService.groovy:13820) at com.saviynt.ecm.services.ArsTaskHelperService$_whenTaskTypeIsThreeNewAccountAccess_closure50.doCall(ArsTaskHelperService.groovy:3076) at com.saviynt.ecm.services.ArsTaskHelperService.whenTaskTypeIsThreeNewAccountAccess(ArsTaskHelperService.groovy:3055) at com.saviynt.ecm.services.ArsTaskHelperService$_completeAutoProvTasksUpgraded_closure1.doCall(ArsTaskHelperService.groovy:175) at com.saviynt.ecm.services.ArsTaskHelperService.completeAutoProvTasksUpgraded(ArsTaskHelperService.groovy:160) at MultipleProvisioningJob.execute(MultipleProvisioningJob.groovy:222) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"

7 REPLIES 7

Manu269
All-Star
All-Star

@sampath18 try validating the binding variables :

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

sampath18
Regular Contributor II
Regular Contributor II

Hi @Manu269 validated the binding variables, but in that there is no mention about usage of cp attribute under account object. Any idea on how we can get these cp attributes over mail. I have tried analytics option, but that is not feasible since it is sending attachment when mail is sent.

entitlement = []
provisioningOwners =
users =
requestor =
out = java.io.PrintWriter@1a841e8a
account_password = XXXXXXX
task = com.saviynt.ecm.task.ArsTasks :
accountname = Password -
requestid = 400493
endpointDisplayName = Active Directory
account_name =
endpointOwners =
requestormanager =
user =
taskaction = New Account
account =

[resourceOwners:, tasktype:New Account, manager:, accountOwners:[], randompassword: entitlement:[], provisioningOwners:, users:, requestor:, out:java.io.PrintWriter@1a841e8a, account_password:XXXXXXX, task:com.saviynt.ecm.task.ArsTasks : , accountname: Password - ^, requestid:400493, endpointDisplayName:Active Directory, account_name:, endpointOwners:, requestormanager:, user:, taskaction:New Account, account:]

 

Thanks,
Sampath

sampath18
Regular Contributor II
Regular Contributor II

Hi @Manu269  Sorry, i could not get above example you provided. I have referred email templates linke from docs https://docs.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Chapter06-EIC-Configurations/Creati...

There some binding variable related to account object but no mention about custom attributes of account object.

Thanks,
Sampath

sampath18
Regular Contributor II
Regular Contributor II

Hi Guys,

Anyone suggestion on this topic. we wanted to user account custom property attributes in the email template which need to be sent out after new account is created.

Thanks

Sampath

Manu269
All-Star
All-Star

Hi sampath,

I even tried the same but seems I am unable to get the attributes.

Let's wait if someone else in forum has some suggestions.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @sampath18 

We are checking on this and we will keep you posted.

Regards,

Dhruv Sharma

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @sampath18 

To see the list of supported binding variables, please click on help in the create email template window. You can only use the supported binding variables. 

BindingVariable1.PNG

BindingVariable.PNG

 

Regards,
Dhruv Sharma
If this reply answered your question, please accept it as Solution to help others who may have a similar problem.