Post-Processable Filter Picklist Configurer
  • 28 Jun 2023
  • 1 Minute to read
  • Dark
    Light

Post-Processable Filter Picklist Configurer

  • Dark
    Light

Article summary

Use this Apex hook to control which options are shown in the Line Items Post-Processable Filter Field.

This hook occurs when available options for a given Line Items Post-Processable Filter Field are determined prior to a user opening that field and selecting one of those options.

Apex hook class

  • It must implement the zpl.PostProcessableFilterPicklistConfigurer interface.
  • You must specify the Apex hook class name in the Picklist Configurer Class Name field of the Post-Processable Filter Field. Make sure you have included your Salesforce org namespace prefix in the Apex class name.

Interface definition

/**
 * A hook that provides a full control to the content of the picklist options for the PostProcessableFilterField control.
 */
global interface PostProcessableFilterPicklistConfigurer
{
    /**
     * @param picklistValues the picklist options returned by querying the associated SObject
     * @param config the filter configuration
     *
     * @return the options to display in picklist
     */
    List<zpl.PicklistValue> getPicklistValues(List<zpl.PicklistValue> picklistValues, zpl__PostProcessableFilterField__c config);
}

Example: class implementation

global with sharing class SamplePostProcessableFilterConfigurer implements zpl.PostProcessableFilterPicklistConfigurer
{
    global List<zpl.PicklistValue> getPicklistValues(List<zpl.PicklistValue> picklistValues, zpl__PostProcessableFilterField__c config)
    {
        picklistValues.get(0).label = 'All Products';
        return picklistValues;
    }
}

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.