user650521
user650521

Reputation: 583

Create new Profile Object in salesforce

I want to insert a new Record in Profile object, but when I try to insert with SOQL, it throws an error, CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: [object Object]: entity type cannot be inserted: Profile ,,

How do I resolve this problem. I have to add new records to Profile successfully.

Upvotes: 0

Views: 929

Answers (1)

eyescream
eyescream

Reputation: 19622

You can't.

Profile object does not support create() call.

Profiles are created for example with Metadata API (which is bit hard to access from APEX). You can easily create them if you're calling SF from external application (Eclipse IDE for example but also anything written in Java, .NET, PHP, Ruby...)

There are some code samples in the Metadata API guide: http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_profile.htm

Upvotes: 3

Related Questions