05/29/2023 04:06 AM
Hi team,
Based on our client request we are creating an email where based on entity attribute the domain of email should be different for each entity(for eg : if entity is 'ABD' then domain will be abc@ABD.com and if entity is 'PQT' then domain should be abc@PQT.com), Additionally the code has an increment feature which helps us in appending increment value if duplication is observed across the entities. We have came across an scenario where the email generation which we have created skips all the initial line of code and executes only the last line of code.(basically executes the highlighted part in red only, ignores the above lines of code). We have verified that there were no email created with the first piece of code.
We suspect that it maybe some syntax issue. We tried various approach to eradicate it but none of them worked.
concat(users.firstname,'.',users.lastname, CASE when (users.entity = 'ABC') then '@abc.com' when (users.entity = 'PQR') then '@pqr.com' else '@else.com' end) end#
concat(users.firstname,'.',users.lastname,'2', CASE when (users.entity = 'ABC') then '@abc.com' when (users.entity = 'PQR') then '@pqr.com' else '@else.com' end)
Requesting you to please help us with your suggestion on the above query.
Thanks,
Prithviraj
05/29/2023 03:38 PM
Does entitlement name is all capital ?
05/29/2023 09:42 PM
Hi Rushikesh,
Thanks for your quick response.
We are using user attribute entity, which is not necessarily in all caps. it is maybe a string of many words (for eg : "New Cities of India").
Regards,
Prithviraj