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
Rachel LinderRachel Linder 

Object Record name update based on another field

I have a custom object called "Vendor Part Numbers" that has autonumber currently for the record name.I would like to use a Vendor field and a Part Number field together at the record "Name" instead of the current autonumber that is being placed there. Couple questions:

1. When adding/creating a new record it is required to put a name there. Can this be avoided?
2. I am thinking this would be a workflow rule with a field update?
3. For the records that are already have the autonumber should I do an export and import to update those?

Thanks.

 

Andy BoettcherAndy Boettcher
1.  Unfortunately no, this cannot be avoided with the regular page layout.  If you use a publisher action you can pre-populate fields however.
2.  Could be, or you do it in one fell swoop via a publisher action.  =)
3.  Yes - import/export.
Terence_ChiuTerence_Chiu
Hi Rachel,

1) Name is always required. You can get around this by using a custom button with URL hack to default the name to a default value such as "To Be Determined".  For example the following example defaults the Opportunity Name to "To Be Determined".

/006/e?opp3=To%20Be%20Determined

2) Yes you can use a workflow or a process builder flow to facilitate this. My assumption is that the fields the Naming convention is comprised of will be required on the page layout or via validation rule ?
3) Once you switch the Name field from autonumber to text you can export the records and perform a mass update so you are correct.
Andy BoettcherAndy Boettcher
Terence,

You are correct - a URL hack could absolutely satisfy this requirement as well, but URL hacks are not supported by Salesforce.  If the UI changes at all, URL hacks can be rendered useless and you're back to square one.
Terence_ChiuTerence_Chiu
Either way will work, URL hacks are not supported, however, it is being used by the customer community. It all depends on the UI requirements and whether Rachel needs a full edit page as opposed to a publisher action layout. Both will achieve the goal.