機械翻訳について

「商談の編集」ページへの価格再設定処理の追加

営業担当が更新された価格を取得するために使用できる処理を「商談の編集」ページに追加します。

  1. アプリケーション・コンポーザで、「標準オブジェクト」「商談」「処理およびリンク」にナビゲートします。

  2. 「作成」アイコンをクリックします。

  3. 「商談: 処理またはリンクの作成」ページで、「表示ラベル」フィールドにReprice Opportunityと入力します。 「表示ラベル」フィールド以外の場所をクリックすると、「名前」フィールドに内部名が自動的に移入されます。

  4. 「タイプ」フィールドで、「処理」が選択されていることを確認します。

  5. 「スクリプト」リージョンで、「新規」アイコンをクリックします。

  6. 「オブジェクト関数の作成」ページで、「関数名」フィールドにRepriceOptyと入力します。

  7. 「スクリプトの編集」リージョンに次のスクリプトを入力します。

    def revenueItems = ChildRevenue
    def pricebook = nvl (PriceBook_Obj_c, null)
    if (pricebook == null)
    return
    def priceBookId = pricebook?.getAttribute("PricebookId")
    
    def view_PriceBookItem = newView('PriceBookItem')
    def view_Criteria = newViewCriteria(view_PriceBookItem)
    def view_criteria_row = view_Criteria.createRow()
    def view_condition = view_criteria_row.ensureCriteriaItem('InvItemId')
    view_condition.setOperator('=')
    
    
    view_Criteria.insertRow(view_criteria_row)
    view_PriceBookItem.appendViewCriteria(view_Criteria)
    def view_condition_1 = view_criteria_row.ensureCriteriaItem('PricebookId')
    view_condition_1.setOperator('=')
    view_condition_1.setValue(priceBookId)
    while (revenueItems.hasNext()) {
    def revenueLine = revenueItems.next()
    def itemid= nvl(revenueLine.InventoryItemId, 0L)
    def invorgid = nvl (revenueLine.InventoryOrgId, 0L)
    view_condition.setValue(itemid)
    //1,400 is the number of records in the system; change this number according to your system records.
    view_PriceBookItem.setMaxFetchSize(1400) 
    view_PriceBookItem.executeQuery()
    while(view_PriceBookItem.hasNext()){
    def var_Row = view_PriceBookItem.next()
    
    //Get the price from PriceBookItem for the item you want:
    revenueLine.setAttribute('UnitPrice', var_Row.getAttribute('ListPrice'))}
    }
  8. 「保存して閉じる」をクリックします。

  9. 「商談: 処理およびリンク」ページに戻り、「保存」をクリックします。

  10. 「商談」「サーバー・スクリプト」「オブジェクト関数」に移動して、処理が作成されていることを確認します。 それがまだ表示されていない場合は、サインアウトし、再度サインインします。
  11. 商談詳細ページに処理を追加します。「商談」「ページ」にナビゲートします。

  12. 「アプリケーション・ページ」タブが選択されていることを確認します。

  13. 「商談: ページ」ページで、「詳細ページ・レイアウト」リージョンを探します。 標準レイアウトを複製し、コピーに名前を付けて編集します。

  14. 「詳細レイアウト」ページで、ページ右上の「処理」ドロップダウン・リストの横にある「編集」アイコンをクリックします。

  15. 「ボタンおよび処理」ページで、作成した処理を検索し、「使用可能な処理」シャトル領域から「選択した処理」シャトル領域に移動します。

  16. 「保存して閉じる」をクリックします。

  17. 「完了」をクリックします。