Loading
The Trailblazer Community is now read-only Read More
Get Started with Communications, Media, and Energy & Utilities (CME)...
GetProductListInterface

GetProductListInterface

Get the list of products to choose as conditions for contract template sections.

Type

Loosely typed

Triggered When

The GetProductListInterface is triggered when the user associates product conditions to template document sections.

Called In

The Document Template page uses the DocumentTemplateDisplayController, which calls the GetProductListInterface.

Signature

Access

Signature

global

Boolean invokeMethod(String methodName, Map inputMap, Map outMap, Map options)

Default Implementation

The DefaultGetProductListImplementationDefaultGetProductListImplementation gets the list of active products.

Other Implementations

None

Input Parameters

methodName

Required

Type: String

The method to execute, for example, getProductList

Output Parameters

productList

Required

The list of products, outMap.put('productList', prodList);

Sample Implementation

global with sharing class CustomGetProductListImplementation implements vlocity_cmt.VlocityOpenInterface
{
   public Boolean invokeMethod(string methodName, Map<string, object> inputMap, Map<string, object> outMap, Map<string, object> options)
   {
      Boolean success = true;
      if(methodName == 'getProductList')
      {
         getProductList(inputMap, outMap, options);
      }
      return success;
   }
   private void getProductList(Map<string, object> inputMap, Map<string, object> outMap, Map<string, object> options)
   {
      List<Product2> prodList = [SELECT
         Id,
         Name
      FROM
         Product2
      WHERE
         IsActive = true
      ORDER BY
         Name
      LIMIT 50000];
      outMap.put('productList', prodList);
   }
}
 
Loading
Salesforce Help | Article