+ Start a Discussion
Mac SwiftMac Swift 

User related query

Is that possible to restrict some user to be owner of any "Accounts" and "contacts". They can create but they cannot be owner of the Account or Contact.

Not sure if it possible. 
ShikibuShikibu
You can do this, but I think it would require visualforce (because the standard "create" page does not allow the owner to be specified; it cannot do so, because the page layout depends upon the owner, and at create the owner is assumed to be the user).
ShikibuShikibu
You could also write a trigger that operates on before insert, and which changes the owner to one that is permitted by your business rules. If this is variable, you could provide a custom lookup field to user, which the trigger copies to owner.
Mac SwiftMac Swift
Thanks Shikibu for replying!
I think it would be great to have a trigger which will execute after hitting the save button. Like we can have one mandatory lookup field where Users need to select the owner and while saving the record the Account Owner will be updated as per the Custom lookup field value.

I am not a developer so I dont have experience in writting the trigger. Any chance could you help me out with the trigger?
ShikibuShikibu
Sorry mac swift that's quite a bit more investment of time than I'm able to provide here. If you need a trigger, you'll need a developer. But you can probably accomplish what you want with a workflow (https://help.salesforce.com/articleView?id=customize_wf.htm&siteLang=en_US&type=0), which might be more within your skill set.