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
niven sfniven sf 

Trigger to update checkbox in contact if contact email and user email are equal

Om PrakashOm Prakash
Try bellow trigger after using your contact's checkbox field api name
trigger ContactTrigger on Contact (before insert) {
   String userEmail = USerInfo.getUserEmail();
   for(Contact objContact : Trigger.New){
	   if( != null && == userEmail){
		   objContact.EmailSameAsContact__C = true;

Trailhead for Trigger