2

I had built an app with a number of objects in a hierarchy. I had figured using an auto number for the NAME field would be useful for quite a few of the objects however now I'm adding data for testing I realise that the NAME field isn't very helpful in lookups and the recent items list. So I've decided that making the TEXT may be a better idea. This leads to another issue in that duplication of data entry will be required as in certain circumstances the NAME would make sense as a computation of a number of existing text fields on the object.

I have seen posts about using workflow to set the NAME field when saved instead. Anyone else use this approach? It's a real pity that the NAME field can't have a formula!

  • 4
    One annoyance with using a workflow to set the Name is that it's still a required field on the Page Layout, which means users have to put something in there, even though it will be instantly overwritten. – Jeremy Nottingham Sep 20 '16 at 12:25
0

Sometimes, Organizations wants to set Name field, as the Name field is referred in Reports, Related Fields(Lookup), Lists, Search Results, Recent List etc.

By controlling this field using a workflow, we are actually setting this field with consistent data and eventually reducing the user input error.

0

One way to do this is to use a quick action. You can use predefined values to set the value of the Name field, and if you use an object-specific quick action to create the record as a child of another record, you can even include field values from the parent record. Additionally, you can remove the Name field from the quick action form even though it's a required field -- as long as you provide something in the predefined value for that field, the record will save.

For example: say you're creating an opportunity from an account, and you always want the opportunity name to be in the format "AccountName - Date Created". You would:

  1. From the Account object, create a new Action of the Create a Record action type, with Opportunity as the target object.
  2. Set up the form to include the fields you care about. Optionally, you can remove the Name field from the form. Save the form.
  3. On the action detail page, in the Predefined Field Values related list, create a new predefined value for Opportunity Name. For the formula, use Account.Name & " - " & TODAY(). Save the predefined value.

Now you can add the quick action to your page.

This has some limitations in support. You can't use quick actions (at this time) on the actual related list in the page layout - they can only go in the actions sections. In Lightning this works pretty well because all the actions (standard/custom buttons & quick actions) are combined in a single list. In Classic quick actions can only placed in the Chatter publisher.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.