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
Sumit Sharma 34Sumit Sharma 34 

Don't update LeadOwner if updated through csv import

Please suggest best way to accomplish below mentioned task
1. We want that when new Lead is created then its LeadOwner is assigned with the help of RoundRobin logic.
2. If LeadOwner is updated through salesforce user interface then it should be changed.
3. But when Lead is updated through data import then its LeadOwner should not change. Even if there is LeadOwnerId in imported CSV
Brian Oconnell 23Brian Oconnell 23
You can use a formula field based on the Record ID to check for odd or even, then use a workflow rule to update the Owner on creation of a new record. This formula field should not be displayed on the page layout.  Users can then edit the Owner field to override this "Round Robin".
When importing a CSV, simply do not map the owner ID field.

Create a hidden autonumber field Autonumber__c
Create a hidden formula field Hidden_Field__c:
IF( ROUND((VALUE(Autonumber__c) / 2) ,0)=(VALUE(Autonumber__c) / 2) , "Zach", "Mark")

Example Workflow Rule Field Update
Set Owner field to:
IF(Hidden_Field__c = "Zach",005d0000000aw9t,005d0000000aw9q)
(Use the User ID's of the two owners)