+ Start a Discussion

default value inputField with standard controller



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" ?





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





Let me know if you need anything


"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 ?