A new custom callback class is supported to filter agreements to process from the revenue console. The agreements are filtered based on the fields specified by the user. 

To add the custom class

  1. Go to Setup > App Setup > Develop > Apex Classes.
  2. Click New.
  3. Enter the sample callback class code.


This is just a sample callback class to control which agreements to process for revenue management. You may change the code as per your requirements.


/**
  * Class used to contain one or more parameters for a given callback.
  */
global class Parameters
{
	// The Custom setting used to control which "fields" are presented to the user
	global RevenueAgreementFilterProperties__c filterProperties;

	// The values entered by the user. There should be 10 entries with null for
	// each field that is disabled. The 1st entry pertains to the 1st field, the
	// 2nd entry pertains to the 2nd field, and so on.
	global List<String> filterFieldValues;
}

global interface IAgreementFilterCallback {

	/**
	  * Return an SOQL filter expression that will be appended to the "stock"
	  * query used to fetch Agreements a given Revenue centric batch job.
	  *
	  * @param params Extra parameters for this method. Contains the 
	  *  "field values" entered by the user.
	  */
	String getAgreementFilterExpression(Parameters params);
}
public class TestCallBackClass implements CustomClass.IAgreementFilterCallback {
    public String getAgreementFilterExpression(CustomClass.Parameters params){
            String filterQuery;
	        if(params !=null){
            	filterQuery = 'Apttus__Account__r.Name = \''+params.filterFieldValues[0]+'\' ';
    		}
    		return filterQuery;
	}
    public String getAgreementRevenueSummaryFilterExpression(CustomClass.Parameters params){
    String filterQuery;
    if(params !=null){
    	filterQuery = 'Agreement__r.Apttus__Account__r.Name = \''+params.filterFieldValues[0]+'\' ';
    }
    return filterQuery;
    }

}

CODE

4. Click Save.


To register your custom callback class, go to Setup > App Setup > Develop > Custom Settings and click Manage beside Revenue System Properties. Click Edit for System Properties and enter the name of your custom callback class in Agreement Filter Callback Class

Refer to Revenue System Properties for more details.