0

I am working on a scenario where we have a custom object which has standard Name field and an Autonumber field and 3 record types. I am trying to update the Name field based on the record type as below:

If record type is A then update Name field as Name = 'A-'+ AutonumberField__c If record type is B then update Name field as Name = 'B-'+ AutonumberField__c If record type is C then update Name field as Name = 'C-'+ AutonumberField__c

I was trying the following in the process builder below but not sure of the exact syntax:

     (             
        IF( [CustomObject__c].RecordType.Name, 'A',  
              [CustomObject__c].Name ='A'+[CustomObject__c].Name+AutoNumField__c)
     )

The conditions can be easily written if a Trigger is used but facing trouble in building the conditions in the process builder.

2
  • your text problem description states you are smashing the Name field to be recTypeName+AutoNumber but your code has you appending the autonumber to the name field. which is it?
    – cropredy
    Commented Aug 4, 2020 at 19:24
  • @cropredy, Please ignore my code, I was trying something which was not working.
    – Suhasini
    Commented Aug 5, 2020 at 0:32

1 Answer 1

0

The formula to set the custom object's name is simply:

[CustomObject__c].RecordType.Name & '-' & [CustomObject__c].AutoNumberField__c

You must log in to answer this question.

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