+ 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 
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"