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

Insert Custom Setting

I am trying to insert a custom setting for a user as such


MySetting__c x = new MySetting__c(); = 'blfd'; x.setupOwnerId = UserInfo.getUserId(); insert(x);


 The error I get is "System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: SetupOwnerId (id value of incorrect type): [SetupOwnerId]"


what is the data type for setupOwnerId ?