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
Kishan Kumar 77Kishan Kumar 77 

write a trigger to add a suffix at the end of an email address

 Write a trigger to add “.invalid” suffix at the end of an email id for all the user as below :
Ex : Email Id : Raj@gmail.com.invalid

Also, I need to write a function that removes the ".invalid" added to the Email id.
Ex- Email id-Raj@gmail.com
Mangesh Bhapkar213Mangesh Bhapkar213

Hi,

As you want to update email id for all User.

Email Address: An email is sent to the new email address so that the change can be confirmed. The field is not updated until the email address owner confirms the change. An email is also sent to the older email address informing the change.

Please check this out:

Mass update email addresses and usernames (https://help.salesforce.com/articleView?id=000338592&type=1&mode=1)

Disable 'Email Change Verification (https://help.salesforce.com/articleView?id=000324664&type=1&mode=1)

Thanks,
Mangesh