オーダー管理拡張での新しいメソッドの使用

オーダー管理拡張で新しいパブリック・メソッドを使用できます。 それらを明示的にコーディングする必要はなくなりました

次のような利点があります:

  • 拡張機能をコーディングする際の柔軟性が高まります。
  • 生産性が向上します。 実装の複雑さとコストを削減できます。

次の新しいメソッドを使用できます:

メソッド

オブジェクト

説明

setAttributeValues 1行の1つ以上の属性の値を設定します。

isOpen

オーダー・ヘッダー

次のいずれかを返します:

  • True. 販売オーダーはオープンです。
  • False. クローズ済または取消済です。

isClosedOrCancelled

オーダー・ヘッダー

次のいずれかを返します:

  • True. 販売オーダーは終了または取消されています。
  • False. It's open.

isClosedOrCancelled

オーダー明細

次のいずれかを返します:

  • True. オーダー明細がクローズまたは取り消されました。
  • False. It's open.

isCancellationRequested

オーダー明細

次のいずれかを返します:

  • True. オーダー明細を取り消すリクエストを受け取りました。
  • False. そのリクエストを受け取っていません。

isFulfilled

オーダー明細

次のいずれかを返します:

  • True. オーダー明細は履行済です。
  • False. 満たされていません。

isInvoiceInterfaced

オーダー明細

次のいずれかを返します:

  • True. Order Managementから請求システムにオーダー明細が送信されました。
  • False. 行は送信されていません。

isUpdateAllowed

オーダー明細

次のいずれかを返します:

  • True. オーダー明細が履行されていないか、Order Managementによって請求システムに送信されていないため、オーダー明細を更新できます。
  • False. 履行済または請求済であるため、更新できません。

isRowCreationAllowed

行イテレータ

次のいずれかを返します:

  • True. 親を更新できるため、子行を作成できます。
  • False. 親を更新できないため、子を作成できません。

addExternalAssetDocumentReference

オーダー明細

文書参照を作成します。 外部アセットをサブスクリプションに追加する場合に使用します。

addAmendSubscriptionDocumentReference

オーダー明細

文書参照を作成します。 サブスクリプションを修正する場合に使用します。

addRenewSubscriptionDocumentReference

オーダー明細

文書参照を作成します。 サブスクリプションを更新する場合に使用します。

  • オーダー明細の属性の値を更新する必要があります。 isUpdateAllowedを使用して、属性を更新できるかどうかを判断できます。
  • オーダー明細の支払条件を更新する必要があります。 isOpenおよびisInvoiceInterfacedを使用して、支払条件を更新できるかどうかを判断できます。

販売実績を作成する必要があるとします。 isrowCreationAllowedを使用して、親行が更新可能かどうかを確認できます:

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
  }
}

setAttributeValuesを使用して、行オブジェクトの複数の属性の値を設定し、パフォーマンスを向上させます:

// 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);

外部アセットをサブスクリプションに追加する必要があるとします。 addExternalAssetDocumentReferenceを使用して、そのサブスクリプションのドキュメント参照を作成できます:

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);
  }
}

有効化のステップ

この機能を有効化するうえで必要な操作はありません。

主なリソース

アクセス要件

この権限を含む構成済ジョブ・ロールが割り当てられているユーザーは、この機能にアクセスできます。

  • オーダー管理拡張の管理(FOM_MANAGE_ORDER_MANAGEMENT_EXTENTIONS)

この権限は、この更新の前から使用可能でした。