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 Aug 4 '20 at 19:24
  • @cropredy, Please ignore my code, I was trying something which was not working. – Suha Aug 5 '20 at 0:32
0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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