[SalesForce] Updating Record Name (auto-generated) using Process flow

I am working on a Developer edition. I have a custom object with an Auto-generated Record Name field. I am trying to update this field with some prefix text to make it more meaningful for the record.

All I get is this error:

This error occurred when the flow tried to update records: INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set..

I can see, as a System administrator, my profile has only have READ-ONLY access to this Auto-generated field. How to get Edit access to this field, that way I can update it without this error?

Best Answer

You cannot update Auto Number fields, by nature.

If you want to have a Name field that includes an Auto Number as well as some text derived from other fields on the record, you should add a non-Name Auto Number field to your object. You can then use Process Builder to populate the Name field with a formula incorporating that Auto Number field along with any other text you wish to include.

Note, however, that because the Name field is required, you'll have to start populating something as a placeholder at the time of creating the record, prior to the point at which your Process Builder takes over and generates a name. This can be a bit of a slog to get right across all UI facets; users generally don't want to have to enter "placeholder" values.

You might also consider keeping the Name as Auto Number and populating a different field - say, Description - with your more detailed record identifier.

Related Topic