1

I am trying to setup a lookup relationshiop for createdbyid as I have done for contact and account , as I am loading in migration data

for example for a custom object field i have called Constituent__C

i used

Constituent__r.external_id 

and everything works great

but user object and audit fields are a little different

I tried doing this Field is CreatedById so i attempted

CreatedBy.external_id 

for the user module, and nothing happens

i used this SO to help me, but not getting any results Where is the documentation for the CreatedBy object?

  • 2
    Have you enabled the audit fields as mentioned here – Raul Mar 23 '17 at 13:57
  • @RahulSharma that fixed it, make an answer and ill give you credit – Jay Rizzi May 4 '17 at 12:20
2

These standard fields- Created By, Created Date, Last Modified By ID, Last Modified Date are setup audit fields which are locked by default.

For migrating the legacy data, you would have to unlock audit fields by logging a case with Salesforce. (quoting from documentation):

For a System Administrator to enable the feature they can follow the click-path below:

Setup | Customize | User Interface | Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions

Here are some knowledge articles for reference-

  1. Enable Create Audit Fields
  2. Set audit field values for imported records (Created By, Created Date, Last Modified By ID, Last Modified Date)
  3. Considerations before having Create Audit Fields enabled
  4. Set Audit Fields and Update Records with Inactive Owners
| improve this answer | |
  • 1
    Fun fact, you no longer have to open a case to enable this permission. – Adrian Larson May 4 '17 at 20:05
  • Thanks @AdrianLarson for the information, I was not aware of it. Added information as per your comment. – Raul May 4 '17 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.