0

im getting error on below logic

IF(RecordType.Name== 'Purchase Order',  Name='po-'CC_OrderNumber__c- CC_Sales_Order__r.CC_OrderNumber__c ,
Name ='so-'CC_OrderNumber__c - C_Project__r.Name )

Error: Incorrect parameter type for operator '-'. Expected Number, Date, DateTime, received Text

3
  • im getting error on below logicIF(RecordType.Name== 'Purchase Order', Name ='po-'+CC_OrderNumber__c-CC_Sales_Order__r.CC_OrderNumber__c , Name ='so-'+CC_OrderNumber__c-CC_Project__r.Name )Error: Incorrect parameter type for operator '-'. Expected Number, Date, DateTime, received Text
    – SriRamya.B
    Commented Oct 3, 2016 at 9:57
  • 1
    If i understood, your setting up name to something if record type is purchase order. This can be done by using workflow but not formula field
    – S B
    Commented Oct 3, 2016 at 10:03
  • 1
    What is the return type of the formula and what is the purpose of the field? Just putting in a formula does not give us enough to help you. See - How to Ask
    – Dave Humm
    Commented Oct 3, 2016 at 10:22

1 Answer 1

0

You are missing a concatenation operator in several places

IF(RecordType.Name== 'Purchase Order',  
   Name='po-' & CC_OrderNumber__c & '-' & CC_Sales_Order__r.CC_OrderNumber__c ,
   Name ='so-' & CC_OrderNumber__c & '-' &  C_Project__r.Name )

You must log in to answer this question.

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