+ Start a Discussion
DharmendraDharmendra 

Createable is true for createdbyid, CreatedDate, LastModifiedById, and LastModifiedDate

Hi,

I'm working with Partner APIs and for integration purpose, For a Salesforce account, I've received the Sobjects and its fields.
For sOjbects: Lead, Contact, Case, Event and Account, I fetch fields details for these and found that createdbyid, CreatedDate, LastModifiedById, and LastModifiedDate fields of these objects have Createable property as true for this Salesforce account.
According to Salesforce documentation and UI, we can't modify the createable status to true for these system fields.

Is there any way to modify the createable to true for these system fields?

Please help me to identify it, as I haven't found a way for modifying it or why Salesforce Partner API return its value to true.
Best Answer chosen by Dharmendra
Rajendra RathoreRajendra Rathore
Hi Dharmendra,

This is happnig due to winter 16 release because in winter 16 relese you can update System fields like createdbyid, CreatedDate, LastModifiedById, and LastModifiedDate if  create records through the  Data loader Or API 

Audit Fields
For some scenarios, you need to set values for fields that aren’t normally editable, for example, when migrating data to Salesforce. In that situation, it’s often preferable to replace the Salesforce record creation date with the date on which the record was created in the original system. Or when working with a record that has an inactive owner, you often want to change ownership of the record to an active owner.

We’ve created two user permissions to cover these scenarios, which previously required that you contact Salesforce.
Set Audit Fields upon Record Creation
Set audit fields, such as Created By and Last Modified By, when you create a record (API only).


See here : http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm?eid=singlesend&d=70130000000NIyh (http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm?eid=singlesend&d=70130000000NIyh)

Thanks,
Rajendra

All Answers

Rajendra RathoreRajendra Rathore
Hi Dharmendra,

This is happnig due to winter 16 release because in winter 16 relese you can update System fields like createdbyid, CreatedDate, LastModifiedById, and LastModifiedDate if  create records through the  Data loader Or API 

Audit Fields
For some scenarios, you need to set values for fields that aren’t normally editable, for example, when migrating data to Salesforce. In that situation, it’s often preferable to replace the Salesforce record creation date with the date on which the record was created in the original system. Or when working with a record that has an inactive owner, you often want to change ownership of the record to an active owner.

We’ve created two user permissions to cover these scenarios, which previously required that you contact Salesforce.
Set Audit Fields upon Record Creation
Set audit fields, such as Created By and Last Modified By, when you create a record (API only).


See here : http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm?eid=singlesend&d=70130000000NIyh (http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm?eid=singlesend&d=70130000000NIyh)

Thanks,
Rajendra
This was selected as the best answer
DharmendraDharmendra
Hi Rajendra, 
Thanks for the reply. I've verified with the Salesforce account and its the same feature used in that account.
Jason Liveston 8Jason Liveston 8
There is a major limitation for not being able to update LastModifiedById.  Say you have an external system and when an account is updated it gets pushed to salesforce to update via a web api.  Everything works fine, but the last modified by name will be the user who's context is used when the api call is made, generally an administrator type userid, so you are stuck with any update to the record from external systems saying "system' or "administrator" instead of the user who actually modified the record.  Workarounds are to create custom last modified by fields and pass the name to this but this is more work to maintain and you have to update it initially as well.