Action Invoker Callback provides you a mechanism to implement custom navigation for custom actions. You can define logic for a custom page to redirect the Sales rep to.

To use the Action Invoker Callback you must create a custom Apex class that implements the Apttus_Config2.CustomClass.IActionInvokerCallback interface and register the custom apex class with Action Invoker Callback Class. You must write your custom logic in the custom apex class.

The following methods are available in the Apttus_Config2.CustomClass.IActionInvokerCallback interface.

MethodSignatureDescription
invokeActionSystem.PageReference invokeAction(Apttus_Config2.ProductConfiguration, Apttus_Config2.CustomClass.ActionParams)You can use this method to execute the custom navigation upon the Sales rep's click of the custom action.

Example

The following sample code is a skeletal structure of custom callback class that implements the IActionInvokerCallback interface. You can write your own logic and return navigation for the custom action defined in Display Action Setting for the specific flow.

global with sharing class DefaultActionInvokerCallback implements Apttus_Config2.CustomClass.IActionInvokerCallback {   
   /**
    * Callback to invoke the custom action
    * @param cart the cart object
    * @param params the parameters for the action
    * @return the result page reference or null if there is no page
    */
   	 global ApexPages.PageReference invokeAction(ProductConfiguration cart, Apttus_Config2.CustomClass.ActionParams params) {
        	// do nothing
      		return null;     
    	}                  
}
CODE