01/06/2023 03:37 AM
Hi All,
Can someone pls help how to substring user's customproperty in email template.
For example - customproperty44 is having string value as "abc.xyz@domain.com"
Requirement is to pass username in template as "abcxyz" from customproperty44 [Here dot is removed in between abc & xyz and also "@domain.com" is removed.
Thanks,
Harish
Thanks,
Harish
Solved! Go to Solution.
01/06/2023 04:02 AM
${user.customproperty44.substring(0, user.customproperty44.lastIndexOf('@')).replace('.','')}
01/06/2023 04:49 PM
Please handle null pointer exception in case cp44 is blank
01/06/2023 07:36 AM
Thank you @Sivagami it worked.
01/09/2023 06:34 AM
Can u please help me in replacing dot with comma+space
For example abc.xyz should be replaced with comma and space like abc, xyz in CN of AD account (Account Name Rule)
Tried with CN=${user.customproperty1.replace('.','\\, '),OU=abc,DC=xyz,DC=com} but it is giving error Invalid Argument while AD account creation.
Thanks,
Harish
01/09/2023 07:07 AM
CN=${user.customproperty1.replace('.',',').replace(' ','')},OU=abc,DC=xyz,DC=com
01/09/2023 07:57 AM