function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arpita1111Arpita1111 

select the owner field on record create

All,

I have a requirement in which I have to create a record in which I can select the owner, not default to the login user as the owner. IS there any way to accomplish this?

Regards

Sonam_SFDCSonam_SFDC
This doesn't look feasible through the visualforce page from where the user is creating the record, however, you can have a trigger work on the same object where you are creating the record such that you are able to change the ownership once the VF page commits data in the DB..
Todd B.Todd B.
How are you creaeting the record, manually or thorugh a data feed?  If you are doing it manually, create the record, save it, then change the owner.  If it's throught a data feed, a trigger may be the way to go.  
Arpita1111Arpita1111
Thank for replying. I am creating the record manually and I am in production org so cannot create the trigger directly there, thats the reason I was searching for some way to change the owner on creation. My issue is I have a user lookup field and whatever value that field has,I want the owner to update with that value .
I thought creating  workflow rule would solve my issue but when i create the action to update the owner, it asks me to select one user and I cant select another field.
So this is the work around I thought if I could directly change/select the owner on creation of record.This all is standard page layouts no vf page.

If you can help or find any other way to satisfy this direcly in production that would be great.

Thanks