Add Attributes for Opportunity Summary and Revenue Lines Synchronization
You can enhance and perform opportunity summary and revenue line synchronization for some attributes using Groovy scripting. Use the sample scripts in this topic to add rule definitions to the predefined opportunity cascading logic.
The rule definitions keep opportunity summary and revenue lines in synchronization with each other. Here's how to add specific attributes for opportunity summary and revenue lines synchronization:
-
Sign in as a sales administrator or a setup user.
-
Navigate to Application Composer.
-
Select Sales to filter the object search.
-
Expand Standard Objects and then expand Opportunity.
-
Under Opportunity, click Server Scripts.
The Server Scripts Help Request page opens.
-
Under Validation Rules tab, select Action - Add under the Field Rules region and enter values as shown in the following example:
Field
Value
Field Name
Choose the field or attribute that you want from the drop-down list of values.
Rule Name
Enter a meaning full name for the rule.
Error Message
Enter a user-defined error message, for example, a message that warns the user the synchronization cascade has failed.
Rule Definition
In the script text field, cut and paste the script that you have written to validate the condition. For example, see the sections Sample Groovy Scripts for Opportunity Attributes and Sample Groovy Scripts for Opportunity Revenue Attributes in this topic for sample groovy scripts.
-
Click Save and Close.
For a more detailed explanation of Groovy scripting using Application Composer, see the Oracle Applications Cloud Groovy Scripting Reference.
Sample Groovy Scripts for Opportunity Attributes
This table contains sample groovy script code for a subset of opportunity attributes:
Attribute |
Sample Groovy Script |
---|---|
Close Date |
|
Status and StatusCodeSetId Both the Status and StatusCodeSetId attributes have to be assigned together. If you decide to selectively enable synchronization cascade for Status, then you must also perform synchronization cascade for StatusCodeSetId. |
|
Win/Loss and ReasonWonLostCodeSetId |
|
Primary Partner |
|
Primary Competitor |
|
Sample Groovy Scripts for Opportunity Revenue Attributes
Let's look at sample groovy script code for a subset of opportunity revenue attributes.
Attribute |
Sample Groovy Script |
---|---|
Win Probability |
|
Sales Channel |
|
Include Forecast |
|