+ Start a Discussion
Max_gMax_g 

Issue setting created by field using a trigger

I am using a trigger to upsert a custom object using data loader.  I need to set the createdby field on the object as the Owner of the related account.  My trigger is telling me the createdby field is not a writeable field.  How do I set this value?  Would I be better off adding a custom field and assigning my owner to that field?

Best Answer chosen by Admin (Salesforce Developers) 
alibzafaralibzafar

Log a case with salesforce to allow you access to this field , but this will work only for insert . 

 

Thanks