You need to sign in to do that
Don't have an account?
Chidanand Magadum 24
Change the Owner of the record through Apex
Hi Guys,
Is it possible to change the owner of the record through Apex code? If so, how to achieve it?
Is it possible to change the owner of the record through Apex code? If so, how to achieve it?
Yes, it is possible. You need to update the ownerId field with the Id of the User who should be the owner. For eg: In the below eg i am updating the Owner of the account.
It is not possible to set a rollup field - these are basically a formula field which looks at all child records which match the criteria set out in the field.
Many thanks