商談が作成されたときに呼び出されるプロセスビルダーがあると、さらに自動起動フローが呼び出されて商談 ID が渡されます。このフローでは、新しく作成された商談に対して Quote.OpportunityId を持つ見積が作成され、Opportunity.SyncedQuoteId が作成された見積に更新されます。
このシナリオでは見積が作成され、Opportunity.SyncedQuoteId も Quote ID を持ちますが、Quote.IsSyncing 項目は「False」で、見積 UI には [同期開始] ボタンが表示されます。
[同期開始] をクリックしても、何も同期されません。
メッセージ「Quote TestFromPB is already synced with this opportunity.An opportunity can be synced with only one quote.If you continue, TestFromPB won’t sync.」(見積 TestFromPB はこの商談とすでに同期されています。商談は 1 つの見積とだけ同期できます。続行しても TestFromPB は同期されません) が表示されます。
見積には品目がなく、商談には商品がありません。
見積が同期されると、商談商品名と見積品目名が自動的に更新されます。
Quote.IsSyncing は「False」です。
原因:
見積が作成されると同期解除状態になるため、Opportunity.SyncedQuoteId は null になります。
この場合、商談の挿入、見積の挿入、商談の更新が 1 つのトランザクションで発生すると、フローアクションによって Opportunity.SyncedQuoteId が作成された見積 ID に設定されるため、プロセスでは見積 ID の変更が検出されず、同期されません。
商談は親トランザクションに保存され、同じトランザクションは終了しません。同じトランザクションに見積が挿入され、商談が更新されます。ここでの問題は、商談エンティティの挿入と、SyncedQuoteId が更新された商談エンティティの保存が同じトランザクションにあることです。これは再帰的な保存であるため、更新アクション中に同期がトリガーされることはありません。見積 ID は常に商談で更新されます。
同期開始プロセス中は、見積 ID は SyncedQuoteId 項目とは異なります。これが異なる場合は見積が同期され、同じ場合は無視されます。
新しい見積を手動で作成して同期した場合、同期された見積 ID はこれと異なるため、同期は正常に完了します。
「トランザクションのフロー」のドキュメントのとおり、
一時停止要素が実行されるとフローのトランザクションが終了します。
ソリューションはトランザクションを分割することです。
フローを呼び出してトランザクションを分割する前に、プロセスビルダーで「after 0 hours of CreatedDate (CreatedDate の 0 時間後)」としてスケジュールアクションを作成します。
Salesforce によるスケジュール済みアクションの処理方法
000391126

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.