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

Trying to code a formula field...Need some help.

Heres the scoop....  I need to have a field autopopulate with data that will be coming from two different objects, either one or the other based on record type.


Here is what I have, but the '||', or "OR" is not working as I had hoped.  Any suggestions??


IF( RecordTypeId ='012M00000008bcI', Chaney_Account__r.Customer_Number__c,"") ||
IF(RecordTypeId ='012M00000008bcD',PW_Account__r.BPCS_Customer_Number__c,"")

Best Answer chosen by Admin (Salesforce Developers) 
Jake GmerekJake Gmerek

IF( RecordTypeId ='012M00000008bcI', Chaney_Account__r.Customer_Number__c, IF(RecordTypeId ='012M00000008bcD',PW_Account__r.BPCS_Customer_Number__c,""))


Should fix your problem