Post-Processable Filter Picklist Configurer
- 28 Jun 2023
- 1 Minute to read
- Print
- DarkLight
Post-Processable Filter Picklist Configurer
- Updated on 28 Jun 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
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?