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
AndyuxAndyux 

Quote validation formula with product

I am not seeing it: Error: Syntax error. Missing ')'
AND(
(PricebookEntry.Product2.Released__c,"FALSE"),
NOT(ISPICKVAL(Quote_Type__c,"Budgetary"))
)

 
Best Answer chosen by Andyux
AndyuxAndyux
Going on the QuoteLineItem object for validation is the right direction. Also had to reference CPQ product ( i didnt know this was different).
So for CPQ it ends up like this
AND( 
SBQQ__Product__r.Released__c = FALSE, 
NOT(ISPICKVAL(SBQQ__Quote__r.Quote_Type__c,"Budgetary")) 
)

Thanks 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Please try below formula
AND(
	PricebookEntry.Product2.Released__c == "FALSE",
	NOT( ISPICKVAL(Quote_Type__c,"Budgetary") )
)


Let us know if this will help you
AndyuxAndyux
Amit, thanks. I am getting Error: Field PricebookEntry does not exist. Check spelling.
Product2 is the product object, from what i could gather i has to be referenced via PricebookEntry
Amit Chaudhary 8Amit Chaudhary 8
on which object you are creating Validation or formula field ?
 
Akhil AnilAkhil Anil
Hi Andyux,
 
I believe that you are writing this on the QuoteLineItem object rather than the Quote object as you cannot reference a product from the Quote. Products are referenced through Quote Line Item. So your formula will be like this
 
AND(
	Product2.Released__c == "FALSE",
	NOT( ISPICKVAL(Quote_Type__c,"Budgetary") )
)

Kindly mark it as an answer if that works !
AndyuxAndyux
Going on the QuoteLineItem object for validation is the right direction. Also had to reference CPQ product ( i didnt know this was different).
So for CPQ it ends up like this
AND( 
SBQQ__Product__r.Released__c = FALSE, 
NOT(ISPICKVAL(SBQQ__Quote__r.Quote_Type__c,"Budgetary")) 
)

Thanks 
This was selected as the best answer