機械翻訳について

営業ステージが変更されたときに商談のステータスを変更するにはどうすればよいですか?

アプリケーションには、営業ステージが変更されたときに商談のステータスを自動的に変更する事前定義済のメカニズムはありません。 商談のステータスが「成約」に変更されると、営業メソッドの営業ステージの予想動作が「オーダー」列の最後の番号に移動します。

ただし、次のようなGroovyスクリプトを作成して、営業ステージに基づいて商談のステータスを変更できます。

//Change the opportunity status based on sales stage (no matter what the sales stage is)

def stageId = null
def salesStageVO = null
def foundRows = null
def voRow = null
def salesStageStatus = null
def curOptyStatus = getAttribute('StatusCode')
 
stageId = getAttribute('SalesStageId')
salesStageVO = newView('SalesStageVO')
foundRows = salesStageVO.findByKey(key(stageId),1)
if (foundRows.size() == 1)
{
  voRow = foundRows[0]
  salesStageStatus = voRow.getAttribute('StageStatusCd')
}
if (salesStageStatus != null && curOptyStatus != salesStageStatus)
{
  setAttribute('StatusCode', salesStageStatus)
}