Issue implementing Oracle-supplied Groovy trigger regarding assigning territories
Last updated on MAY 18, 2016
Applies to:Oracle Fusion Sales Cloud Service - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
On : 18.104.22.168.0 version, Accounts, Contacts, Households
ACTUAL BEHAVIOR (Customer's description)
When a territory is assigned to an account, customer would like to automatically make the territory owner the owner of the account as well. Customer found an Oracle KM doc (Doc ID 2059311.1) that gives the code on how to do this. The code supplied in the KM doc looks like it was intended to be added to the Sales Account object. Since customer is on R10 and don't use the Sales Account object any longer, the code was modified so it can be added to the Account object instead. The code executes correctly, but the results are not what customer is expecting. Here is what we think is happening:
1) Update one of the dimensions used in assignment on the account record.
2) Save the account.
3) Groovy trigger to assign the territory owner to the account as the owner is fired.
4) Assignment of account changes.
Based on the above steps, the issue seems to be occuring because steps 3 and 4 are in the wrong order. What we would expect to happen is that the account undergoes reassignment and THEN the Groovy trigger fires to add the territory owner as the account owner.
Account owner should be the territory owner.
The issue can be reproduced at will with the following steps:
See doc Oracle Sales Cloud: Setting Account Owner Field Based on Territory Owner (Doc ID 2059311.1)
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms