Newer Version Available

This content describes an older version of this product. View Latest

COA_ServiceOrderClone Class

Clone an existing order in the org where the Channel Order App (COA) is installed.

Namespace

Only fields that you have permission to create are cloned. DML errors can occur if you don’t have sufficient privileges.

Note

CHANNEL_ORDERS

Usage

The COA_ServiceOrderClone class contains a single @InvocableMethod to clone orders and, optionally, associated line items. When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:

For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.

Example

This example receives a list of service orders, clones them, and returns a list of outputs from the clone operation.

For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code in your implementation, you must include the namespace prefix.

Note