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:

  • True. The sales order is open.
  • False. It's closed or cancelled.

isClosedOrCancelled

Order Header

Returns one of:

  • True. The sales order is closed or cancelled.
  • False. It's open.

isClosedOrCancelled

Order Line

Returns one of:

  • True. The order line is closed or cancelled.
  • False. It's open.

isCancellationRequested

Order Line

Returns one of:

  • True. Received a request to cancel the order line.
  • False. Haven't received that request.

isFulfilled

Order Line

Returns one of:

  • True. The order line is fulfilled.
  • False. It isn’t fulfilled.

isInvoiceInterfaced

Order Line

Returns one of:

  • True. Order Management sent the order line to the billing system.
  • False. It hasn't sent the line.

isUpdateAllowed

Order Line

Returns one of:

  • True. You can update the order line because it isn’t fulfilled or Order Management hasn’t sent it to the billing system.
  • False. You can't update it because it's fulfilled or billed.

isRowCreationAllowed

Row Iterator

Returns one of:

  • True. You can create a child row because you can update the parent.
  • False. You can't create a child because you can't update the parent.

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.