機械翻訳について

商談要約と売上明細を同期するための属性の追加

Groovyスクリプトを使用して、一部の属性について商談要約と売上明細の同期を拡張および実行できます。 このトピックのサンプル・スクリプトを使用して、事前定義済商談カスケード・ロジックにルール定義を追加します。

ルール定義により、商談要約と売上明細の相互同期を維持します。 商談要約と売上明細を同期するための特定の属性を追加する方法を次に示します。

  1. 営業管理者または設定ユーザーとしてサインインします。

  2. 「アプリケーション・コンポーザ」にナビゲートします。

  3. 「営業」を選択して、オブジェクト検索をフィルタします。

  4. 「標準オブジェクト」を展開してから、「商談」を展開します。

  5. 「商談」で、「サーバー・スクリプト」をクリックします。

    サーバー・スクリプト・ヘルプ要求ページが開きます。

  6. 「検証ルール」タブで、「フィールド・ルール」リージョンの下の「処理」→「追加」を選択し、次の例に示すように値を入力します。

    フィールド

    フィールド名

    ドロップダウン値リストから、必要なフィールドまたは属性を選択します。

    ルール名

    ルールの意味のあるフル・ネームを入力します。

    エラー・メッセージ

    ユーザー定義のエラー・メッセージ(たとえば、同期カスケードが失敗したことをユーザーに警告するメッセージ)を入力します。

    ルール定義

    スクリプト・テキスト・フィールドに、条件を検証するために記述したスクリプトを切り取ってペーストします。 Groovyスクリプトのサンプルについては、このトピックの「商談属性のサンプルGroovyスクリプト」および「商談売上属性のサンプルGroovyスクリプト」の項を参照してください。

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

アプリケーション・コンポーザを使用したGroovyスクリプトの詳細は、『Oracle Applications Cloud Groovyスクリプト・リファレンス』を参照してください。

商談属性のサンプルGroovyスクリプト

次の表に、商談属性のサブセットのサンプルGroovyスクリプト・コードを示します。

属性

サンプルGroovyスクリプト

クローズ日

cascadeInSyncValueToAllRevenues("EffectiveDate", oldValue, newValue)

return true

ステータスおよびStatusCodeSetId

ステータスとStatusCodeSetIdの両方の属性を一緒に割り当てる必要があります。 ステータスの同期カスケードを選択的に有効にする場合は、StatusCodeSetIdの同期カスケードも実行する必要があります。

// For Status def cache_name = '_statuscode_insync_cascade' 
if (oldValue == 'OPEN' && newValue == 'WON')  
{
// Only allow synchronization cascade if Status moved from OPEN to WON.    
cascadeInSyncValueToAllRevenues("StatusCode", oldValue, newValue)        

// Mark this opportunity's StatusCode as having been synchronization cascaded  
adf.userSession.userData.put(getAttribute('OptyId') + cache_name, true)
// mark this opportunity as having status just cascaded. 
}
return true

// For StatusCodeSetIddef cache_name = '_statuscode_insync_cascade'def insync_cascade = adf.userSession.userData[getAttribute('OptyId') 
+ cache_name]println("StatusCodeSetId: insync_cascade = " 
+ insync_cascade)insync_cascade = (insync_cascade == null) ? false : insync_cascade  
// ensure insync_cascade is either true/false try 

{   
if (insync_cascade)    
    {
cascadeInSyncValueToAllRevenues("StatusCodeSetId", oldValue, newValue)     
// only cascade if the Status has just been cascaded.   
    }
}
Finally
{  adf.userSession.userData.remove(getAttribute("OptyId") + cache_name)
}
return true

受注/失注およびReasonWonLostCodeSetId

// For Win/Loss Reasondef cache_name = '_winlossreason_insync_cascade'if (oldValue == 'INSTALL_BASE' && newValue == 'TEST_VO_1') 
{   cascadeInSyncValueToAllRevenues("ReasonWonLostCode", oldValue, newValue)  
// Mark this opportunity's WinLossReason as having been synchronization cascaded   adf.userSession.userData.put(getAttribute('OptyId') 
+ cache_name, true)}return true
// For ReasonWonLostCodeSetIddef cache_name = '_winlossreason_insync_cascade'def insync_cascade = adf.userSession.userData[getAttribute('OptyId') 
+ cache_name]println("ReasonWonLostCodeSetId: insync_cascade = " 
+ insync_cascade)insync_cascade = (insync_cascade == null) ? false : insync_cascade    

// ensure insync_cascade is either true/falsetry 
{
  if (insync_cascade)
     {     cascadeInSyncValueToAllRevenues("ReasonWonLostCodeSetId", oldValue, newValue)      
     }
}finally
{  
adf.userSession.userData.remove(getAttribute("OptyId") + cache_name)
}
return true

プライマリ・パートナ

cascadeInSyncValueToAllRevenues("PrimaryPartnerId", oldValue, newValue)

return true

プライマリ競合相手

cascadeInSyncValueToAllRevenues("PrimaryCompetitorId", oldValue, newValue)

return true

商談売上属性のサンプルGroovyスクリプト

商談売上属性のサブセットのサンプルgroovyスクリプト・コードを見てみましょう。

属性

サンプルGroovyスクリプト

受注確度

cascadeInSyncValueToAllRevenues("WinProb", oldValue, newValue) 
return true

販売チャネル

cascadeInSyncValueToAllRevenues("SalesChannelCd", oldValue, newValue)
return true

予測を含む

cascadeInSyncValueToAllRevenues("SalesChannelCd", oldValue, newValue)
return true