Newer Version Available
COA_ServiceOrderRecall Class
Recall orders that you’ve submitted to Salesforce Partner Operations.
Namespace
Usage
The COA_ServiceOrderRecall class contains a single @InvocableMethod for recalling orders that have been
submitted to Salesforce Partner Operations but haven’t yet been processed. When you
recall an order, it’s removed from the processing queue and isn’t activated. When
invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:
1CHANNEL_ORDERS.class.method(args)For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
Example
This example receives a list of service orders, recalls them, and returns a list of outputs
from the recall operation.
1public static void recallOrders(List<Service_Order__c> serviceOrders){
2 List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput> serviceOrderRecallInput = new List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput>();
3
4 for(Service_Order__c serviceOrder: serviceOrders){
5 COA_ServiceOrderRecall.COA_ServiceOrderRecallInput input = new COA_ServiceOrderRecall.COA_ServiceOrderRecallInput();
6 input.serviceOrderId = serviceOrder.Id;
7 serviceOrderRecallInput.add(input);
8 }
9
10 List<COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput> serviceOrderRecallOutputs = COA_ServiceOrderRecall.recall(serviceOrderRecallInput);
11
12 for(COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput serviceOrderRecallOutput: serviceOrderRecallOutputs){
13 System.debug('Service Order Id: '+serviceOrderRecallOutput.serviceOrderId);
14 System.debug('Success?: '+serviceOrderRecallOutput.isSuccess);
15 System.debug('Response Messages: '+serviceOrderRecallOutput.responseMessages);
16 }
17}