How many times in your entire salesforce experience you might have thought that, I should be able to update or be able to set the created date field on a record. I am telling you about my own experience : more than a thousand times 😁.So here is the post about Salesforce.com – Setting the record createdDate while creating a record.
There is a way to enable it by contacting Salesforce and enable auditing in the org. This is still one of the way to get it done.
But you can also enable it your self without contacting Salesforce support. Again it had only limitation through API calls only.
Let me give an sample scenario and solution to it.
Salesforce.com – Setting the record createdDate while creating a record
Use Case:
We want to integrate with a 3rd party system and wanted to import Leads which were created in the 3rd party system into salesforce. But the issue here is normally we will not be able to retain the lead CreatedDate.
Solution to this use Case:
By using the below method you can import leads using API calls and set the createdDate of the records in Salesforce. Remember this is one time activity . You will not be able to update the date from the User interface. You can set this created date only at record creation.
Steps:
Go to setup > User interface and enable the below highlighted option.
Create a permission set and enable the below options in the permission set, which is under system permission.
Assign this permission set to the user which will be used to import the records .
Now you can use this user to import the record and set the createdDate as per our requirement.
Hope this will help someone out there sometime.
Keep reading and sharing…
Leave a Reply