function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maguy Fogaing 2Maguy Fogaing 2 

encrypt value in fields

Hello everyone
when l create a records of the object task with the recordtype sms l automatically send an email with a text. The text of this email is the contains of the comments (or description) field of the task object and contains random number. 
l want to make the random number encrypted in the task objet record but make the random number appear normally in the email l send.

So in the task record l will have on the comments(or description) field = "Hello your number is xxxx"
and in the mail l will have the content "Hello your number is 456".

Please have ever done this before ? l am looking for solution to handle this.

Thank you in advance.
VinayVinay (Salesforce Developers) 
Hi Maguy,

I haven't done before, however found below references to encrypt  data in standard and custom fields.

https://help.salesforce.com/s/articleView?id=sf.security_pe_enable_standard_fields.htm&type=5
https://help.salesforce.com/s/articleView?id=sf.security_pe_enable_custom_fields.htm&type=5

Please mark as Best Answer if above information was helpful.

Thanks,