-1

I have a Auto Number standard field (Name) of custom object (Term__c) which is to be dependent on custom field Color__c (picklist) of same custom object.

For each picklist value, such as "red", "blue", "green", Name should start from 0, and for each picklist value it should be incremented on creating more records. We have to use trigger.

Can any one let me know how should I proceed?

1
  • Have you had a chance to review the existing questions on Salesforce Stack Exchange about trigger-populated Auto Numbers? Here's one approach from some years back, and another that could be modified for your use case. It's always going to be more efficient to simply use native Auto Number fields, though.
    – David Reed
    Commented Sep 10, 2018 at 13:15

1 Answer 1

0

You cannot modify the behavior of an auto-number field other than to set a display format, which can use the merge fields Y, M, D, and 0, for year, month, day, and the auto-number counter, respectively. You would need to start with a normal text field then update the value in your trigger/process builder/flow.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .