+ Start a Discussion
cedgcedg 

default value inputField with standard controller

Hi,

 

I've overwritten the "New" page of a child object. the page uses the standard controller of my object.

I would like to have default value in the Name and another inputField, based on fields of the parent record, but it doesn't work.

 

When not overwriting the "New" page, i use a custom button with the values in parameters. But in this case, when overwriting the page, the parameters don't seem to be taken into account by the VF page.

 

Have I to create an extension controller and set the default values there or is there something "more simple" ?

 

Thanks

Ced

Gunners_23Gunners_23

That should do fine actually. I'm not sure how you're passing the value and for which object.

 

For ex : Related Opportunity's Name should be pre-populated in the format 'X Account Name' then pls create a button on

 

the object and use the below code while defining the button

 

 

/006/e?retURL=%2F{!Account.Id}&accid={!Account.Id}&saveURL={!Account.Id}&opp3=X+{!Account.FirstName}+{!Account.LastName}

 

Let me know if you need anything

cedgcedg

"opp3" is specific for the name of an opportunity, but what about a custom object ? If I use the parameter "Name" it doesn't work. Is there an equivalent to "opp3" but for any custom object ?