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
JasonGablerJasonGabler 

Defaults Values for Standard Object Fields?

I've come to the conclusion that it is not possible to enter the edit page for a new standard object instance  and have defaults values preset to taste. Correct? (I'm particularly looking at Opportunities here, well more specifically Donations in the NPSP).   While I realize I can set up a Workflow or Trigger to set fields after I submit the form, this is not what I want.  I want the user experience to have the fields set to custom defaults when the page initially renders.

 

- There's nothing in the standard object configuration that seems to offer this functionality.

-  There's nothing in the page layout that seems to offer this functionality.

- You cannot add an S-control to the edit layout.

- You cannot add VisualForce to the edit layout. (I know this idea is up for voting in the IdeaExchange)

 

I'm out of ideas.

 

Am I right to conclude that, until VisualForce pages are available in edit layouts, that this is simply not possible?

 

thanks,

 

jason

Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

it is possible Jason;)

You have to create a custom "Create" button and put it on the home page of your object.

Now, when you click on it, it should call an S-Control/VF Page which will pre-populate the values on your edit form by passing the values you want to set, as URL parametersand will re-direct the user to the Edit page.

So, you will have the values pre-populated:)

Alternatively, you can create a custom Edit page using VF and add on this functionality there. But, that would take more effort then what i mentioned before.

Good Luck!

Cool_D

All Answers

Cool_DevloperCool_Devloper

it is possible Jason;)

You have to create a custom "Create" button and put it on the home page of your object.

Now, when you click on it, it should call an S-Control/VF Page which will pre-populate the values on your edit form by passing the values you want to set, as URL parametersand will re-direct the user to the Edit page.

So, you will have the values pre-populated:)

Alternatively, you can create a custom Edit page using VF and add on this functionality there. But, that would take more effort then what i mentioned before.

Good Luck!

Cool_D

This was selected as the best answer
JasonGablerJasonGabler
Niiiiice.  And I can even create one on a related list.  Perfect.  Thanks!
Cool_DevloperCool_Devloper

Dead on;)

Cool_D