0

I created a custom object and I have a field that is required called "Name".

I am trying to fill in the record with anything (TBD) is fine however I cant get workflow to populate the field before "Save".

I am trying to avoid a VF page for this function. Any ideas?

2
  • If the field is required then you will have to populate it via the UI. WF only act once the record is sent to the database for processing. Since the field is marked as required it must have a value BEFORE you submit it.
    – Eric
    Mar 13, 2015 at 14:13
  • Agreed. If the Name isn't important, change it to an autonumber, and then it'll autopopulate.
    – HomerJ
    Mar 13, 2015 at 14:34

2 Answers 2

1

If you don't care what the name is, I would make it an Autonumber field instead of text. However, if that isn't the case, one trick that I have used in the past is to create a custom "New xxx" button, and put it on the page layout instead of the standard one. The new button would be a URL, that prepopulates the name field when the New page is displayed.

1
  • To be clear I dont initially care what the name is. I am trying to avoid the end user from having to put info in that field each time. After the record is saved I have workflow that will populate it by joining two required Fields (Picklists) togther such as Hospital Name and Service type (Boston - EMR). This is more meaningful then a random number. In order to have meaningful text I dont want the end users to have to put information in that txt field as they will do it diffrently every time. Mar 13, 2015 at 19:15
0

This can be solved by URL hacking that overrides the New button. Especially if you don't have any duplicate checks given that you will smash the name later in the workflow

There are innumerable links showing how this can be done - for example

http://focusonforce.com/configuration/salesforce-url-hacking/

and

http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

just google salesforce URL hack new button

This can also be solved with a custom VF page and controller that does your defaults. The custom VF page will override the New Button

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .