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
Kunal Purohit 4Kunal Purohit 4 

How to assign contact record to another system admin upon creation of new record.

Hello Folks,
There are two System Admin in my Dev Org. Whenever, I will create new Contact record, it must be assigned to another System Admin and Whenever Other System Admin will create Contact Record, it should be assigned to me. (Round Robin)

Here AssignedTo__c is a custom field with Lookup Relation data type(User).

 

Please suggest.

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Kunal,

Can you confirm if you need Trigger logic or flow for this requirement?

Thanks,
 
Kunal Purohit 4Kunal Purohit 4
Hi Sai,
It would be trigger with handler class.

Thanks
Kunal Purohit 4Kunal Purohit 4

Hello Sai Praveen,
Little modification in above issue. Problem statement is Like,

Suppose there are two system Admin in Org. If I am creating two contact record, each contact record should be assigned to each user. Likewise, if there are 3 System Admin, so whennever 3 Contact record is created, it should be assigned to 3 different user accordingly.

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Kunal,

Do you mean it should be assigned in round robin technique. Can it be assigned to the one who created also in this case?

Thanks,
 
Kunal Purohit 4Kunal Purohit 4
Hi Sai Praveen

Yes. It could be assigned to one who created the record.