I’m trying to format the date in the “Access Request” email templates. Some of these email templates include the expiration date (from “removeDate”) as a string argument (according to the documentation: Access Request Reviewer Email Template v1).
Since this is a version 1 template, I tried using the spTools.formatDate() function to define what the date should look like in the email, but this doesn’t seem to work. According to the documentation (Available Email Templates - SailPoint Identity Services) I should be able to use spTools.formatDate($removeDate,“dd-MM -yyyy”) to convert the date from “Monday March 4th 11:00:00 UTC 2024” to 04/03/2024. However, the result is sobering as nothing is returned (empty).
It seems quite complicated to define the correct date and time format for your region, especially with version 1 email templates.
Has anyone managed to solve this issue?
Hi,
thanks for the link. I did read this article already. It is good to know how to get the current date from the own time zone. But this does not help for the Email Templates witch does use a variable like the $removeDate. I tried to change the script but the result is the same.
Thanks Nithesh for the quick reply.
Unfortunately, this doesn’t work either. We do not receive any email now. I tried a couple of combination and nothing did work.
we do use this:
#foreach ( $type in ${requestedObjectDetailsByType.keySet()} ) $type: #foreach ( $detail in ${requestedObjectDetailsByType.get($type)} )
${detail.name} #if($detail.removeDate) (remove date: $detail.removeDate)#end#endxend
result:
remove date: Tue Mar 12 23:00:00 UTC 2024
I am grateful for any further ideas.
Thanks in advanced.