This API returns the list of asset line items of various accounts.

APISignature
getAssetLineItemsWebService static Apttus_CPQApi.CPQAsset.QueryAssetsResponseDO getAssetLineItems(Apttus_CPQApi.CPQAsset.QueryAssetsRequestDO request)
Parameters

Name

Type

Description

requestApttus_CPQApi.CPQAsset.QueryAssetsRequestDORequest object passed by the invoker method.
Request Data Object - Apttus_CPQApi.CPQAsset.QueryAssetsRequestDO

Name

Type

Description

AccountIdsList<ID>List of account IDs.
FieldNamesList<String>

Optional.

Use this to include fields you have added to an Asset Line Item object.

CustomFilterString

Optional.

SOQL condition expression used as a custom filter. For example, you can request only assets after a specified billing end date.

DescendingBoolean

Optional.

This indicates whether assets are sorted in descending order.

SortFieldsList<String>

Optional.

This can be used sort the result based on a list of fields.

OffsetInteger

Optional.

This can be used to include an offset.

NrecordInteger

Optional.

This can be used to limit the number of records returned.

Response Data Object - Apttus_CPQApi.CPQAsset.QueryAssetsResponseDO

Field

Type

Description

AssetCountIntegerN/A
AssetLineItemsList<Apttus_Config2__AssetLineItem__c>List of asset line items.
ErrorsList<String>List of error messages if any error occurred.


Code Sample

The following code sample helps you get a list of asset line items of various accounts.

Public Apttus_CPQApi.CPQAsset.QueryAssetsResponseDO getAssetLineItems () 
{
	Apttus_CPQApi.CPQAsset.QueryAssetsRequestDO request = new Apttus_CPQApi.CPQAsset.QueryAssetsRequestDO();
	request.AccountIds = new List<ID>{'0012f00000BQd03'};
	request.CustomFilter = 'Apttus_Config2__PriceType__c = \'Recurring\''; // optional
	// retrieve all fields in Asset Line Item sObject 
	request.FieldNames = null; 
	// sort by billing end date (optional) 
	request.SortFields = new List{'Apttus_Config2__BillingEndDate__c'}; 

	// call countAssetLineItems API
	Apttus_CPQApi.CPQAsset.QueryAssetsResponseDO response =
	Apttus_CPQApi.CPQAssetWebService.getAssetLineItems (request);
	return response;
}
CODE