+ Start a Discussion
could & rockcould & rock 

How to enable partner account via apex?

Before Summer 15, I used

 Account.IsPartner = true;

Sometime this approach ran into weird code exception. but It did work for most time.

Now in sandbox with Summer 15. the same code is broken.  it already runs into exception

System.SObjectException: Field is not writeable: Account.IsPartner 
GuyClairboisGuyClairbois
You can not set the IsPartner field on creation, but you can update to 'true' it after creation. 

See also the field properties: "Defaulted on created, filter, update"
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_account.htm