Formula for button help

custom-buttonformula

Trying to create a conditional button.

  • If the Opportunity Record type = 0123t000000J8gLAAS, use this link:

    "https://www.smartbizloans.com/"& Opportunity.Application_Number__c,

  • If the Opportunity Record type = 0123t000000dVwWAAU, use this link:
    "https://www.smartbizloans.com/"& Opportunity.Originating_Application_Number__c,

This is what I have made but I am getting errors:

{! 
IF( Opportunity.RecordType  = 0123t000000J8gLAAS,
    "https://www.smartbizloans.com/admin/loans/"& Opportunity.Application_Number__c, 
    (IF(Opportunity.RecordType = 0123t000000dVwWAAU,
    "https://www.smartbizloans.com/admin/loans/"& Opportunity.Originating_Application_Number__c,
    "https://www.smartbizloans.com/admin/loans/"
))) 
} 

Thank you in advance for the help!! Very much appreciated.

Best Answer

Your issue is most likely here:

IF( Opportunity.RecordType  = 0123t000000J8gLAAS

should be (SFDC formula evaluator needs constants to be literal strings):

IF( Opportunity.RecordTypeId  = '0123t000000J8gLAAS'
Related Topic