+ Start a Discussion
admintrmpadmintrmp 

InstallHandler - Creating Custom Settings

I'm trying to create some custom settings using the InstallHandler but it keeps setting the setup owner to the application, when in fact I want the setup owner to belong to the organization.

 

I've set the SetupOwnerId to the organization but it's ignoring it.

 

Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
admintrmpadmintrmp

Coded a solution!

 

Instead of setting a new object record, I've instead used getOrgDefaults() which returns a blank record in which you can add data to.

 

This might be helpful to anyone else who gets stuck on this.