Through a web form, which calls the Salesforce API, the user can submit Case file attachments (along with other Case data fields - such as "contact person"). Once it gets to Salesforce (screen shot below), it seems that the "Created By" name is the name of the authorized Salesforce user for the API. I'm trying to match each attachment to the Case's contact person.

Could this be done through the Salesforce setup panel? I'm looking for something similar to an assignment rule that can edit the name of each attachment's "Created By" field into the "Contact Name" of the Case.


  • Just curious why you care who the Created By ends up being?
    – Adrian Larson
    Sep 23, 2016 at 18:53
  • @AdrianLarson Aside from being a client's request, the web form user actually selects and uploads the attachment but, instead, the "Created By" field takes on the Salesforce user's name (regardless of the web form user). In my case, the field should contain the name that the web form user entered. I have looked at the article in your answer but I'm coming across another error: "Unable to create/update fields: CreatedById. Please check the security settings of this field and verify that it is read/write for your profile or permission set." I'm new to Salesforce, so where do I go to do this?
    – joncoded
    Sep 26, 2016 at 14:33
  • Did you enable Create Audit Fields already?
    – Adrian Larson
    Sep 26, 2016 at 14:34
  • Thanks, I had not but now that I did, I have another "field integrity exception": "Created By ID: id value of incorrect type: [18-character id value]". I know the last 3 characters are check characters but I am doing everything in my power to submit the 15-character version of the ID, yet it still thinks it has 18. Perhaps this is another issue altogether.
    – joncoded
    Sep 26, 2016 at 14:56
  • You have to set a User as the CreatedById. What is the [18-character id value]? You need the first three characters to be 005.
    – Adrian Larson
    Sep 26, 2016 at 14:59

1 Answer 1


Take a look at this help article:

Considerations before having Create Audit Fields enabled:

Salesforce has the ability to set system fields through the API. When you are migrating data from an external system, the API lets you set a number of fields on objects that were previously read-only. By setting these fields, records will appear to have been created at their original created time from your old system.

These fields are permitted additional access through the activation of this feature across the below noted objects:

  • CreatedByID
  • CreatedDate
  • LastModifiedbyID
  • Last ModifiedDate


Note: This does not permit the values to be updated, only inserted.

Permissions Required to set Audit Fields: "Modify All Data"

Once enabled, you will be able to set these fields when creating new records. Since these fields are intended to be audit fields, you will only be able to set them on create, not update. If the records already exist in Salesforce, they will need to be exported to a .csv file, deleted in Salesforce, and then imported with the updated information as new records.

In general, Salesforce recommends that this feature only be enabled while you are doing data migration. In certain cases (such as routinely copying new data from an external system to Salesforce) this can be enabled permanently. This feature must be enabled by an system administrator in the organization.

See Also:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .