Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ccrz.ccLogicOrderReOrder.fetchAddresses
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> fetchAddresses(Map<String, Object>)
Inputs (Required)
This method accepts the Map<String, Object> from the ccrz.ccLogicOrderReOrder.fetchOrder method.
This method requires the following keys in the working map:
- ccrz.ccApi.SUCCESS
- Boolean
Value Usage true The previous method in the logic chain completed successfully. This method executes. false This previous method in the logic chain failed. Execution skips this method, and continues to the next method in the logic chain. - ccrz.ccApiOrder.ORDERLIST
- List<Map<String, Object>>, where the Map<String, Object> represents the ccrz__E_Order__c record whose billing and shipping addresses this method queries.
Logic Performed
This method completes the following actions:
- Evaluates the order's ccrz__BillTo__c and ccrz__ShipTo__c fields, and adds the IDs of the referenced ccrz__E_ContactAddr__c records to a Set<String> of address IDs to query.
- Loops through the ccrz__E_OrderItemGroup__c records associated with the order, and adds their ccrz__ShipTo__c addresses to the Set<String> of address IDs to query.
- Passes the Set<String> of address IDs to ccrz.ccApiAddress.fetch.
Outputs
This method returns the working Map<String, Object>, and sets the following keys:
- ccrz.ccApiAddress.ADDRESSLIST
- List<Map<String, Object>>, where each Map<String, Object> represents a ccrz__E_ContactAddr__c record that describes a billing or shipping address associated with the order or its order item groups.