0

I need to way to set a default value to a Text Record Name field for a custom object, so that once it is saved I can update using a process builder with the Contact name + Created date. I need to do this because my client does not want some weird auto-number to be used to display the record.

I tried using a url hack to achieve this but it does not work in Lightning which this app I am creating is based on. I heard there is a way of doing this using flows but I have not been able to find a clear explanation on how to do this.

Can someone explain to me how I can set a default value to the record name field of a custom object using flows? or some other way to do this?

  • how contact is related to Custom object? – Santanu Boral Dec 11 '16 at 3:18
  • @Santanu Boral The custom object has a master detail relationship with contact – Victor Mora Dec 11 '16 at 4:42
  • Do you know how we can do this with flows? – Victor Mora Dec 11 '16 at 4:42
  • Anybody have any idea of how I would do this??? – Victor Mora Dec 11 '16 at 6:49
  • what you have tried with process builder, you can put here – Santanu Boral Dec 11 '16 at 18:07
0

Sounds to me like you are trying to set a default value for a required name field on create, so user does not have to enter anything, and so you can overwrite with values derived from related records

In classic, a URL hack, while not officially supported, would work well, but not in lightning

Flows will let you do this, but require you to use the flow screen to create the record. So you basically override the new button w the flow, and users would not use the normal new records page. Flows are pretty good in general and now can use the lightning design, but lookups in particular are not so great in flows, so you will need to see if this is an option.

A publisher action should allow for this also, but again would need to be the primary path for creating records for it to work.

Else I'm going to guess that you need a custom lightning component, but unfortunately I'm still getting up to speed on lightning. So someone else will need to chime in on how this can be done, but hopefully this answer will help explain the flow option.

  • actually you could use a autolaunched flow called by process builder to do this. – Dave Humm Dec 12 '16 at 13:16
  • @dave he is trying to pre populate the value on a name field, which is a required field. So user would have to enter something before saving for pb / flow to kick in, and he is trying to find a way to avoid having the user need to enter something – gorav Dec 12 '16 at 13:32
  • True autolaunched flow will only work if the record is created, but it would allow any value in the Name field to be updated by the change. it just needs a temporary default value in the name on creation – Dave Humm Dec 12 '16 at 13:47
  • Setting the temp default value in lightning is exactly what he is trying to figure out. He mentions being able to update after save using pb. – gorav Dec 12 '16 at 13:51

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.