You can invoke this global method to retrieve the list of objects in which a given custom field is used.

APISignature
findCriteriaFieldInCustomSettingsstatic Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchResponse findCriteriaFieldInCustomSettings(Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchRequest request)
Parameters

Name

Type

Description

request

Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchRequest

Request object invoked by the method.

Resquest Data Object - Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchResponse

Field

Type

Description

FieldNameStringThe name field that you want to search.
Response Data Object - Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchRequest

Name

Type

Description

CustomSettingNamesListThe list of custom settings in which the requested field is present.


Code Sample

The following code sample allows you to fetch the list of objects in which the request custom field is used.

Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchRequest request = new Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchRequest();
request.FieldName = 'Quantity__c'; // namespace prefixed field name to search
Apttus_Config2.CPQAdminStruct2.CriteriaFieldSearchResponse response = Apttus_Config2.RemoteCPQAdminController.findCriteriaFieldInCustomSettings(request);
System.debug('*** Matching Custom Setting Names: ' + JSON.serialize(response.CustomSettingNames));
/* Matching Custom Setting Names: ["Config Asset Pricing Criteria Fields","Config LineItem Criteria Fields","Config Expression Criteria Fields","Config Custom Display Columns","Config Data Cache","Config Field Set"]*/
CODE