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

unable to add hyperlink in the mail body, when we used if else condition in mail body

Sekhar
Regular Contributor
Regular Contributor

Hi,

I need to send an email based on CP8.

<%if (user.customproperty8.equalsIgnoreCase('ID')) print " ABC " else if (user.customproperty8.equalsIgnoreCase('ES')) print " GHI" else print " XYZ" %>

Above logic working good, based on CP8 its sending email, but i need to add hyperlink in it. If we add any hyperlink in the logic then we are getting below error.

Sekhar_0-1718011661233.png

Could you please help in the this. I need to add hyperlink in the email body.

Thanks,

Sekhar

 

8 REPLIES 8

pmahalle
All-Star
All-Star

@Sekhar  Can  you share your email template,


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

Sekhar
Regular Contributor
Regular Contributor

Hi @pmahalle ,

Email template:

<%if (user.customproperty8.equalsIgnoreCase('ID')) print " Kepada ${manager?.firstname} ${manager?.lastname},
Proses onboarding untuk ${user.firstname} ${user.lastname} sedang berlangsung. Detailnya sebagai berikut:
ID Karyawan - ${user.employeeid}
ID Jaringan/Perusahaan - ${user.username}
Akun Email - ${user.email!=null?user.email:''}
Saat ini, tanggal mulai yang diharapkan adalah ${user.startdate.format('yyyy-MM-dd')}.
Jika berlaku, pastikan aset teknologi siap untuk karyawan baru Anda. Ini termasuk komputer/laptop, desktop virtual, monitor, telepon, dll.TOLONG JANGAN MEMBALAS - email ini dihasilkan oleh sistem dan tidak menerima pesan masuk. " else if (user.customproperty8.equalsIgnoreCase('ES')) print " Estimado ${manager?.firstname} ${manager?.lastname},
El proceso de onboarding para ${user.firstname} ${user.lastname} está en marcha. Sus detalles están a continuación:
ID de empleado - ${user.employeeid}
Cuenta de red - ${user.username}
Cuenta de correo electrónico - ${user.email!=null?user.email:''}
Actualmente, su fecha de inicio prevista es ${user.startdate.format('yyyy-MM-dd')}.
Si corresponde, asegúrate de que los activos tecnológicos estén listos para su nuevo empleado. Esto incluye equipo/portátil, escritorio virtual, monitor(es), teléfono, etc.POR FAVOR, NO RESPONDAS - este correo electrónico fue generado por el sistema y no acepta mensajes entrantes." else print " Dear ${manager?.firstname} ${manager?.lastname},
The onboarding for ${user.firstname} ${user.lastname} is in process. Their details are below:   
Employee ID - ${user.employeeid}
Enterprise/Network ID - ${user.username}
Email Account - ${user.email!=null?user.email:''}
Currently, their expected Start Date is ${user.startdate.format('yyyy-MM-dd')}.
If applicable, ensure the technology assets are ready for your new hire. This includes computer/laptop, virtual desktop, monitor(s), phone, etc. PLEASE DO NOT REPLY – this email was system generated and does not accept incoming messages" %>

We are sending different language email based on CP8 value, we need to add hyperlink in every email.

 

Thanks,

Sekhar

NM
Honored Contributor II
Honored Contributor II

Hi @Sekhar , where do you need to add the hyperlink? after the if else statement?

Sekhar
Regular Contributor
Regular Contributor

Hi @NM ,

I need to add the hyperlink after start date. 

Thanks,

Sekhar

Hi @Sekhar ,

Share the template with hyperlink where you are getting error. You can replace dummy url in place of your client's url, in case present.


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

Sekhar
Regular Contributor
Regular Contributor

Hi @pmahalle 

<a href="https://www.google.com">Onboarding</a>.

Iam getting error, when i am trying to save the email template after added the hyperlink in the email body.

 

Thanks,

Sekhar

Try below and check once:

<a href=\"https://www.google.com\">Onboarding</a>.


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

Sekhar
Regular Contributor
Regular Contributor

Hi @pmahalle ,

Now hyperlink is added in the email body.

Thanks,

sekhar