getFilterDefaultValue(quote, fieldName)

Determines the value for the initial search. Salesforce CPQ calls this implemented method for each input field.

Signature

global String getFilterDefaultValue(SObject quote, String fieldName)

Parameters

quote
Type: SObject
The current quote.
fieldName
Type: String
Quote field used in evaluations to determine the method's output.

Return Value

Type: String

Returns the string value used as the filter's initial search input.

Example

In this example, the method sets the product family filter's value to Service if the quote has a type of Quote.

global String getFilterDefaultValue(SObject quote, String fieldName) {
  // This would set Product Family filter to Service if Quote Type is Quote
  return (fieldName == 'Family' && quote.SBQQ__Type__c. == 'Quote') ? 'Service' : null;
}