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

  • 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 – B.SriRamya Oct 3 '16 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 – Shravan Boddula Oct 3 '16 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 Oct 3 '16 at 10:22
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 )

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.