ccrz.ccLogicOrderSplitOrder.createNewOrderItems
Creates ccrz__E_OrderItem__c records for the new
orders, based on the specified split order criteria.
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Signature
global virtual Map<String, Object> createNewOrderItems(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> after the ccrz.ccLogicOrderSplitOrder.insertNewOrders method completes.
This method requires the following keys in the working map:
- ccrz.ccApiOrder.ORDCLNMAP
-
Map<String, Map<String, ccrz__E_Order__c>>, where:
- The outer map's key is the original order ID.
- Each inner map's key is the criteria for splitting order items: seller ID.
- Each inner map's value is the list of created child ccrz__E_Order__c records.
- ccrz.ccApiOrder.ORDERLIST
- List<ccrz__E_Order__c> of the original orders to split.
- ccrz.ccApiOrder.SPLORDITM
-
Map<String, Map<String, List<ccrz__E_OrderItem__c>>>, where:
- The outer map's key is the original order ID.
- Each inner map's key is the criteria for splitting order items: seller ID.
- Each inner map's value is the list of corresponding ccrz__E_OrderItem__c data.
Logic Performed
This method completes the following actions:
- Evaluates the list of created child orders in ccrz.ccApiOrder.ORDCLNMAP.
- Evaluates the list of order items, split by criteria, in ccrz.ccApiOrder.SPLORDITM.
- Calls the ccrz.ccLogicOrderSplitOrder.copyOrderItem inner method on each order item, and adds the created ccrz__E_OrderItem__c to a list to insert.
Outputs
This method returns the working Map<String, Object>, and sets the following keys:
- ccrz.ccApiOrder.NEWORDITMLST
- List<ccrz__E_OrderItem__c> of the new order items that the ccrz.ccLogicOrderSplitOrder.copyOrderItem method creates.