SCM

scmc.RecurringPurchaseOrderService

global with sharing class RecurringPurchaseOrderService

A service to provide recurring Purchase Order functionality.

Methods

create

global static Map<Id, List<Id>> create(Set<Id> purchaseOrderIdSet)

The create method creates Recurring Purchase Orders from a given Purchase Order. The Purchase Order from which the Recurring Purchase Orders are created must have the Recurring Purchase Order? check box checked and the Purchase Order must be approved.

Input Parameters

Name Type Description
purchaseOrderIdSet Set<Id> The IDs of Purchase orders from which recuring Purchase orders will be created.

Exceptions Thrown

Value Description
An exception indicating a problem encountered during the recurring process.

Return Value

Map<Id, List<Id>> where key is the given Purchase order ID and value is a list of ids for the newly created recurring Purchase Orders against the key.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

Set<Id> purchaseOrderIds = new Set<Id>{'a069E0000004NBO'};

Map<Id,List<Id>> recurringPOIdsByPOIds = SCMC.RecurringPurchaseOrderService.create(purchaseOrderIds);
© Copyright 2009–2020 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.