How can I change the Opportunity panel on accounts to display only open opportunities?
By default, the Opportunities panel on the account details page displays both open and closed opportunities, but you can use Oracle Visual Builder Studio to change the query parameters and display only open opportunities.
Here's how to create a panel that displays only open opportunities on Accounts:
- In Oracle Sales in the Redwood User Experience, open one of the accounts to display the details page.
- From the Settings and Actions menu, select Edit Page in Visual Builder Studio.
-
In the Components panel, click Panel Container Layout.
- In the Display Logic panel on the right, duplicate one of the layouts provided by
Oracle. Oracle provides 3 layouts targeted at sales administrators, sales managers,
and sales representatives.
- Check the Condition field of the copy and make sure that you have the appropriate job roles to preview the results. You can assign the roles to yourself in the Security Console or temporarily delete all conditions to make your copy the default.
- Duplicate the Opportunity Panel Template in the layout
copy.
- Click the name of the copy you made to open it.
Click the Code button.
- Replace the variable in the title parameter with a title of your own title, for
example: Open Opportunities. Here's the resulting
code:
<oj-vb-fragment-param name="title" value="[['Open Opportunities']]"></oj-vb-fragment-param>
-
Add the following filter in the query to display only opportunities with the status of open:
{"key": "StatusCode", "value": "Open", "conjuction": "AND"}
Here's the complete query parameter:
<oj-vb-fragment-param name="query" value='[[ [{"type": "qbe", "provider": "adfRest", "params": [{"key": "TargetPartyId", "value": $base.page.variables.id }, {"key": "StatusCode", "value": "Open", "conjuction": "AND"}]}] ]]'></oj-vb-fragment-param>
The complete code will look similar to this:<template id="opportunitiesPanelTemplate2"> <oj-vb-fragment name="oracle_cx_fragmentsUI:cx-panel" class="oj-sp-foldout-layout-panel" bridge="[[ vbBridge ]]"> <oj-vb-fragment-param name="resource" value='[[ {"name": "opportunities", "primaryKey": "OptyId", "puid": "OptyNumber" } ]]'></oj-vb-fragment-param> <oj-vb-fragment-param name="sortCriteria" value='[[ [{"attribute": "EffectiveDate","direction": "descending" }] ]]'></oj-vb-fragment-param> <oj-vb-fragment-param name="query" value='[[ [{"type": "qbe", "provider": "adfRest", "params": [{"key": "TargetPartyId", "value": $base.page.variables.id }, {"key": "StatusCode", "value": "Open", "conjuction": "AND"}]}] ]]'></oj-vb-fragment-param> <oj-vb-fragment-param name="rollupLayoutId" value="[[ 'OpportunityLayout' ]]"></oj-vb-fragment-param> <oj-vb-fragment-param name="title" value="[['Open Opportunities']]"></oj-vb-fragment-param> </oj-vb-fragment> </template>
- Click the Preview button to preview your configuration.
Here's a screenshot of the resulting Open Opportunities and Opportunities panels on the copy of the sales administrator layout.
