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
yuhan chen 3yuhan chen 3 

populate name field automatically

As a standard field, name field must be filled out when creating a record except usring auto number.

But we want to use a different auto number method that concatenates two fields in a related record and apply the concatenated value into name field using workflow or trigger.

But in this way, we have to fill out the name field first, and then workflow or trigger will override the name field with the concatenated value.

Is there any idea that we can exclude the name field inputting process in the first place and let trigger or workflow fill out the field?

Any idea is appreciated.
ShirishaShirisha (Salesforce Developers) 
Hi Yuhan,

Greetings!

If you would like to create the Trigger then you would need to get the Name of the record first in the Trigger.new and then concatenate the name value and update the field.

Otherwise,you can simply create the formula field to concatenate the fields values without using any automation so that the field will be updated whenever the record is created/edited.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
yuhan chen 3yuhan chen 3

Hi Shirisha

Thank you for your answer.
The thing we want to do is to create a record with the name field filled out automatically by trigger or workflow.
But since the name field is a mandatory field when creating a record, so it has to be input manually, which we want to leave out.

do you have any other ideas to inplement this?