function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priya M 22Priya M 22 

Auto generated number for all the related custom object per account

Hi Everyone,

Issue: Auto generated number for all the related custom object per account. i.e

Account1 -- CustomObj1, CustomObj2, CustomObj3
Account2 -- CustomObj1, CustomObj2, CustomObj3... so on

Solution:
Account --(Master Detail Relationship) ---CustomObj
 For its solution i have created one customObj_Count__c field of rollup summary type. Now using process builder when i am trying to update the Auto-generated field by using formula 'CustomObj'+TEXT([CustomObj__c].Account.CustomObj__c)  its giving me values in CustomObj0,CustomObj1, CustomObj2, CustomObj3..
There for i tried changing my code to  
IF( ((TEXT([CustomObj__c].Account.CustomObj__c) =  0), 'CustomObj'+TEXT(([CustomObj__c].Account.CustomObj__c)+ 1),  'CustomObj'+TEXT([CustomObj__c].Account.CustomObj__c) ) 
and now i am getting output as
CustomObj1,CustomObj1, CustomObj2, CustomObj3

Please, help me out here what i am doing wrong.
Best Answer chosen by Priya M 22
Priya M 22Priya M 22
Got the solution.. unfortunately i was overthinking this one.. Just an increment was required 

'CustomObj'+TEXT(([CustomObj__c].Account.CustomObj__c)+ 1)