機械翻訳について

オーダーの発行日の更新

拡張可能フレックスフィールドを使用してオーダー発行日を更新する拡張を作成します。

このトピックではサンプル値を使用します。 ビジネス要件によっては、別の値が必要になる場合があります。

  1. 拡張可能フレックスフィールドを作成します。

    属性

    名前

    H1AttributeDateTime1

    カテゴリ

    追加ヘッダー情報

    コンテキスト

    HeaderContext1

    拡張可能フレックスフィールドの作成方法の詳細は、「オーダー管理での拡張可能フレックスフィールドの設定」を参照してください。

  2. 「設定および保守」作業領域で、タスクに移動します。

    • オファリング: オーダー管理

    • 機能領域: オーダー

    • タスク: オーダー管理拡張の管理

  3. 「オーダー管理拡張の管理」ページで、要素を確認します。

    • 拡張点ごとに1つずつ、3つのタブ。

    • シーケンス列。 オーダー管理では、各拡張ポイントの拡張機能が順序列の値に従って順番に実行されます。 たとえば、最初の行の値が10、2番目の行の値が30、3番目の行の値が20の場合、オーダー管理では行1、行3、行2が実行されます。

  4. 「オーダー管理拡張の管理」ページで、「処理」>「新規作成」をクリックします。

  5. 「拡張の作成」ダイアログで、デフォルト値を受け入れ、OKをクリックします。

    「既存の使用」オプションは、すでに存在する拡張への参照を作成します。 コピーは作成されません。 たとえば、My_Extensionという名前の拡張機能が保存時拡張ポイントにすでに存在するとします。 発行リクエストの開始時拡張ポイントで拡張を作成するときに、既存の使用をMy_Extensionに設定したとします。 今後の任意の時点で発行リクエストの開始時からMy_Extensionを変更すると、オーダー管理では、変更を加えて保存時のMy_Extensionが自動的に更新されます。 保存時にMy_Extensionを変更すると、オーダー管理は発行リクエストの開始時にMy_Extensionを更新します。

  6. 「拡張の作成」ページの「発行リクエスト」の開始時タブで、値を入力します。

    属性

    名前

    オーダー発行日の更新

    説明

    この拡張により、拡張可能フレックスフィールドの値が、オーダー管理が販売オーダーを発行した日時に設定されます。

  7. 定義領域で、コードを追加します。

    // Make sure the extension runs only for your test sales order. If more than one developers use your test environment, then this condition makes sure the code updates only your sales order. You must remove this condition in a production environment.
    def poNumber = header.getAttribute("CustomerPONumber");
    if( !"UpdateOrderSubmissionDate".equals(poNumber) ) return;
    
    // Get the current time, and then create an instance of java.sql.Date, and set it to the current time.
    long currentTime = new Date().getTime();
    def date = new java.sql.Date(currentTime);
    
    // Get the row for the flexfield context named HeaderContext1.
    def flexfieldContext = header.getOrCreateContextRow("HeaderContext1");
    
    // Set the date on the attribute named _H1AttributeDateTime1 to the current date. Use flexfieldContext to identify the flexfield context where _H1AttributeDateTime1 resides, which is HeaderContext1.
    flexfieldContext.setAttribute("_H1AttributeDateTime1", date);
  8. 「検証」>「保存してクローズ」をクリックします。

設定のテスト

  1. オーダー管理作業領域にナビゲートし、新しい販売オーダーを作成し、「送信」をクリックします。

    属性

    購買オーダー

    UpdateOrderSubmitDate_run_extension

  2. 「処理」>「追加情報の表示」をクリックします。

  3. 「追加情報」ダイアログで、HeaderEFFDetailsをクリックし、ダイアログに値が表示されることを確認します。

    属性

    H1AttributeDateTime1

    現在の日時。 たとえば:

    04/01/17 6:25 PM