COA_ServiceOrderRecall クラス
Salesforce パートナー事業部に送信した注文を取り消します。
名前空間
使用方法
COA_ServiceOrderRecall クラスには、Salesforce パートナー事業部に送信され、まだ処理はされていない注文を取り消すための単一の @InvocableMethod が含まれます。注文を取り消すと、処理中のキューから注文が削除されて有効化されません。このクラスで定義されたメソッドを呼び出す場合、CHANNEL_ORDERS 名前空間プレフィックスを含めます。
1CHANNEL_ORDERS.class.method(args)名前空間プレフィックスまたは @InvocableMethod アノテーションについての詳細は、『Apex 開発者ガイド』を参照してください。
例
この例では、サービス注文のリストを受信し、そのサービス注文を取り消して、取り消し操作からの出力のリストを返します。
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}