IActionCallback3 Interface
IActionCallback3 class provides a mechanism to apply custom actions before delete and copy actions on bundles.
The following methods are available in the Apttus_Config2.CustomClass.IActionCallback3 interface:
Method | Signature | Description |
---|---|---|
beforeCopyBundleLineItems() | Apttus_Config2.CustomClass.ActionCallbackResponse beforeCopyBundleLineItems(Apttus_Config2.CustomClass.ActionCallbackRequest) | You can use this method to perform tasks to be executed before a bundle is copied. This method is invoked when the Sales Rep Clones bundle or standalone product. |
beforeDeleteBundleLineItems() | Apttus_Config2.CustomClass.ActionCallbackResponse beforeDeleteBundleLineItems(Apttus_Config2.CustomClass.ActionCallbackRequest) | You can use this method to perform tasks to be executed before performing the following actions:
|
Request Parameters: Apttus_Config2.CustomClass.ActionCallbackRequest | ||
---|---|---|
Name | Type | Description |
BundleLineItemIds |
| The list IDs of line items. |
CartId |
| The ID of the configuration |
Response Parameters: Apttus_Config2.CustomClass.ActionCallbackResponse | ||
---|---|---|
Name | Type | Description |
errorMessages |
| List of error messages if they occur. |
IsSuccess |
| Indicates whether the action was successful. |
Example 1:
- The number of line items to be deleted is not more than the limit defined in the code.
- The line items are not read-only and any approval request is not pending.
- The line items are not in collaboration.
Example 2:
The sample code below uses beforeCopyBundleLineItems()
to validate line items based on custom logic. You can clone the line only if:
- The number of items to be cloned does not exceed the defined limit.
- The product is active.
You can add more conditions as needed and display relevant error messages based on your business requirements.