Use New Methods in Your Order Management Extensions
You can use new public methods in your order management extensions. You no longer have to explicitly code them.
Realize these benefits:
- Get more flexibility when you code your extensions.
- Improve productivity. You can reduce your implementation's complexity and cost.
You can use these new methods:
Method |
Object |
Description |
setAttributeValues | Row | Set the values for one or more attributes on a row. |
isOpen |
Order Header |
Returns one of:
|
isClosedOrCancelled |
Order Header |
Returns one of:
|
isClosedOrCancelled |
Order Line |
Returns one of:
|
isCancellationRequested |
Order Line |
Returns one of:
|
isFulfilled |
Order Line |
Returns one of:
|
isInvoiceInterfaced |
Order Line |
Returns one of:
|
isUpdateAllowed |
Order Line |
Returns one of:
|
isRowCreationAllowed |
Row Iterator |
Returns one of:
|
addExternalAssetDocumentReference |
Order Line |
Create a document reference. Use it to add an external asset to a subscription. |
addAmendSubscriptionDocumentReference |
Order Line |
Create a document reference. Use it to amend a subscription. |
addRenewSubscriptionDocumentReference |
Order Line |
Create a document reference. Use it to renew a subscription. |
Examples
- You need to update an attribute's value on the order line. You can use isUpdateAllowed to determine whether you can update the attribute.
- You need to update an order line's payment term. You can use isOpen and isInvoiceInterfaced to determine whether you can update the payment term.
Assume you need to create a sales credit. You can use isrowCreationAllowed to check whether the parent row is updatable:
def lines = header.getAttribute("Lines"); while( lines.hasNext() ) { def line = lines.next(); def salesCreditsIterator = line.getAttribute("SalesCredits"); if ( salesCreditsIterator.isRowCreationAllowed() ) { // Logic to create sales credit row and populate the data } }
Use setAttributeValues to set the values for more than one attribute on a row object and improve performance:
// default header attributes using setAttributeValues def orderNum = header.getAttribute("SourceTransactionNumber"); def headerData = ["PaymentTerm":"20 NET", "CustomerPONumber":orderNum]; header.setAttributeValues(headerData); // default header EFF attributes using setAttributeValues Date now = new Date(); def effData = ["compliancedatetime":now, "compliancereason":"This is a compliance reason."]; def effRow = header.getOrCreateContextRow("ComplianceDetails"); effRow.setAttributeValues(effData);
Assume you need to add an external asset to a subscription. You can use addExternalAssetDocumentReference to create a document reference for that subscription:
def lines = header.getAttribute("Lines"); while( lines.hasNext() ) { def line = lines.next(); def contextRow = line.getContextRow("SubscriptionLineContext1"); if ( contextRow == null ) continue; def subscriptionContext = contextRow.getAttribute("SLCAttributeChar1"); if ( subscriptionContext == null) continue; def puid = contextRow.getAttribute("AttributeChar2"); def assetKey = contextRow.getAttribute("AttributeChar4"); if ( "Asset".equals(subscriptionContext) ) { def assetDR = line.addExternalAssetDocumentReference(assetKey, null, null, puid); } else if ( "Amend".equals(subscriptionContext) ) { def amendDR = line.addAmendSubscriptionDocumentReference(assetKey, null, null, puid); } else if ( "Renew".equals(subscriptionContext) ) { def renewDR = line.addRenewSubscriptionDocumentReference(assetKey, null, null, puid); } }
Steps to Enable
You don't need to do anything to enable this feature.
Key Resources
Access Requirements
Users who are assigned a configured job role that contains this privilege can access this feature:
- Manage Order Management Extensions (FOM_MANAGE_ORDER_MANAGEMENT_EXTENTIONS)
This privilege was available before this update.