Loading
Salesforce Document Generation
Apply a Context Filter for Document Generation

Apply a Context Filter for Document Generation

Apply a filter to a template to control which data the context service fetches each time the template is used to generate a document. A context filter can refine data by applying defined conditions, sort records by a single attribute, or limit the number of records returned after sorting.

Required Editions

Available in: Lightning Experience
Available in: Professional, Enterprise, Unlimited, and Developer Editions
User Permissions Needed
To create context filters: DocGen Designer

Before you begin:

  1. Create a context filter.
    The filter becomes available automatically to document templates that use the associated context definition. See Context Filter Capabilities and Limits
  2. Apply the context filter to a document template.
    1. Create a Document Template by Using Context Service for Document Generation.
    2. For the token mapping method, select Context Service.
    3. Select the context definition and mapping.
    4. For Context Filter Name, select the filter you previously created.
      If a filter references an unmapped attribute, document generation fails at run time.
    5. Save the template.
      Document generation applies the filter automatically only during document generation. The filter doesn’t apply during document edits.
 
Laden
Salesforce Help | Article