This question relates very much to Unable to Set Created date even after enabling Set Audit Fields

However, my problem is specifically related to the Knowledge__kav SObject.

I'm trying to import existing knowledge articles into salesforce from a legacy system and for compliance reasons, I need to keep the same CreatedDate.

I've given the running user a permission set, which has the permission "Set Audit Fields upon Record Creation" enabled. When trying to set CreatedDate on Account and ContentVersion sobjects, it works fine, but not for Knowledge__kav.

I tried importing the data both via the API and via APEX. Via the API, the insert is successful, but the CreatedDate is overwritten with the current DateTime. A before insert trigger revealed that CreatedDate was null before insert. Via Apex, I get the error "FATAL_ERROR System.SObjectException: Field is not writeable: Knowledge__kav.CreatedDate"

I can't find any documentation stating that the behaviour of "Set Audit Fields upon Record Creation" is different for Knowledge__kav. Does anyone know?

1 Answer 1


The knowledge article Considerations and activation of 'Create Audit Fields' has a list of objects that are available for these kinds of updates, and unfortunately Knowledge Article isn't one of them.

Perhaps you could make use of a custom field somehow so that the data is still there?


You must log in to answer this question.

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