Adding Assets to Maintenance Plan Using Apex Action
The following are the details about the Create Maintenance Plan Apex action.
CPQ Action Services
Class Name: AddMaintenanceAssetApexAction
Label: Create Maintenance Asset for Maintenance Plan
Structure: AddMaintenanceAssetApexAction.addMaintenanceAssets(List<MaintenancePlanAssetData>)
Request Parameters
The following table explains the parameters required for creating a Maintenance Plan through Apex action.
Parameter
Mandatory?
Description
maintenancePlanId
Yes
The SFDC record Id of the Maintenance Plan record.
List<MaintenanceAssetData> maintenanceAssetDataList
Yes
List which will have the information of the assets which need to be converted to Maintenance Asset.
assetId
Yes
The SFDC record Id of the Asset record.
dateOfFirstWorkOrderInNextBatch
No
The Date of the first work order in the next batch will be used to populate in the Maintenance Asset record.
subscribedAssetFieldName
No
The field name on the Maintenance Asset object is a lookup to a Subscribed Asset object.
subscribedAssetId
No
The Id of the Subscribed Asset object which needs to be copied to one of the Maintenance Asset's fields.
Was this helpful?