+ Start a Discussion
SFAdmin5SFAdmin5 

custom button that sets owner to a default user

hi-

 

i have a custom button on accounts that creates a new opportunity.  i'm able to pre-populate a bunch of fields on the opp by modifying the button's code.  however, i can't seem to modify the button code so that the new opp record gets assigned by default to a specific user.

 

is this possible?  if so, what's the code?  or, is there something else I can do to set that.  I am currently using workflow to update the owner after record creation, but i'd like the owner to be set by default to a specific user before record save

Rahul SharmaRahul Sharma

I think you are passing parameters to url for prepopulating the values,

One option mabe writing Javascript code in the action of the buttton.