function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IC-TannerIC-Tanner 

insert record owner/creator

Hi everyone, 

 

Quick question. Is the owner/creator of a record via an 'insert' DML statement based on the owner of the APEX class that is creating the record?  Is there anyway to specify the owner/creator explicity? 

 

Thanks! 

Anand@SAASAnand@SAAS
Typically it is the system adminstrator created. You can set the "OwnerId" field on the record to a valid User/Queue that you want that record to be owned by.