0

I'm looking at adding a unique identifier field for my assets that will have a prefix of the record type and then a following 4 numbers.

  • Office Equipment
    • Abbreviation of OE
  • Remote Equipment
    • Abbreviation of RE

So we would have OE-0001 and RE-0001 as two unique records, in the same field, same record.

I know we can use something like A-{0000} to specify A as the prefix and {0000} as the minimum numbers to show. But replacing the A is the issue?

Can this be done / how?

  • 1
    How does this have anything to do with lightning? – sfdcfox Jun 25 '18 at 9:31
1

Am sorry this cannot be done with the standard salesforce Autonumber functionality. You have to do some hacks to achieve this.

  1. Convert the name field from Autonumber to Text
  2. Create a new Autonumber Field
  3. Create a WF rule on created, Add a field update to update Name field.

    If(RecordType=='Bla','RE-'+AutoNumberFiled__C,'BE-'+AutoNumberFiled__C)

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.