Configure the Actions Menu for Quotes
Configure the Quotes action menus, such as disabling actions or removing actions altogether. The action menus show up in quote lines in the Edit Opportunity and Edit Account Quotes and Orders subtabs.
You can use either lookup types or Groovy scripting to make the changes.
You must configure the Oracle Configure, Price, and Quote (Oracle CPQ) Action Menu Control lookup to control the display of options in the Actions menu. Set the value to Yes for these codes and enable the lookup type codes.
Lookup Type |
Meaning |
Description |
---|---|---|
ORA_ZCA_CPQ_ACTION |
CPQ Action Menu Control |
Consists of codes that you select to control the display of CPQ options in the Actions menu. |
Lookup Codes |
||
ORA_ZCA_CPQ_ACTION_EDIT |
Edit command in the CPQ action menu |
This lookup option maps to the Edit command in the CPQ Actions menu. |
ORA_ZCA_CPQ_ACTION_DUPLICATE |
Duplicate command in the CPQ action menu |
This lookup option maps to the Duplicate command in the CPQ Actions menu. |
ORA_ZCA_CPQ_ACTION_NEW_VERSION |
Create Version command in the CPQ action menu |
This lookup option maps to the Create Version command in the CPQ Actions menu. |
Here's how to control the display of Oracle CPQ options in the Actions menu.
-
Navigate to the Manage Standard Lookups task in Setup and Maintenance.
-
Search for the CPQ Action Menu Control in the Meaning lookup type.
-
Set the order of the values to the order in which you want them to appear in the Actions menu.
-
Select the Enabled check box.
Use a Groovy Script
You can also use the cpqActionMenuPreRender
Groovy script to implement complex business logic that enables or
disables the menu items. Create this script within SalesOrder object,
Object Functions section. Here's how to create the function:
-
Ensure you're working in an active sandbox.
-
Click
. -
Navigate to Sales Orders in Standard Objects.
-
Expand Sales Orders.
-
Click Server Scripts.
-
Click Object Functions.
-
Click Add in the Action drop-down list.
-
In the Create Object Function enter the following:
Field
Details
Function Name
cpqActionMenuPreRender
Returns
Map
Edit Script
def menuItemsMap = [ORA_ZCA_CPQ_ACTION_EDIT:'N',ORA_ZCA_CPQ_ACTION_NEW_VERSION:'Y',ORA_ZCA_CPQ_ACTION_DUPLICATE:'Y']return menuItemsMap;
-
Click Save and Close.
-
Test your changes. Go to the Opportunity list page, open a record, click the Quotes and Orders subtab, and check the Actions drop-down list in the quotes row.
Disable Oracle CPQ Menu Items
The procedure explains how to disable the Create Oracle CPQ menu item for a specific sales order using sales order attributes from groovy function. Here's how you can use your Groovy script and disable a create Oracle CPQ menu item.
-
Ensure you're working in an active sandbox.
-
Click
. -
Navigate to Sales Orders in Standard Objects.
-
Expand Sales Orders.
-
Click Server Scripts.
-
Click Object Functions.
-
Click the Create icon to add a new object function.
-
In the Create Object Function page, do as follows:
-
Enter cpqActionMenuPreRender in the Function Name field.
-
Select Map in the Returns field.
-
Enter this script in the Edit Script field:
def editDisabled = 'N'; def duplicateDisabled = 'N'; def createVersionDisabled = 'N'; if(Name.equals('Quote1')){ createVersionDisabled = 'Y'; } def menuItemMap = ['ORA_ZCA_CPQ_ACTION_DUPLICATE':editDisabled, 'ORA_ZCA_CPQ_ACTION_EDIT':duplicateDisabled,ORA_ZCA_CPQ_ACTION_NEW_VERSION : createVersionDisabled]; return menuItemMap;
-
-
Click Save and Close.
-
Create an opportunity and post sales order using REST.
-
Test your changes. Drill down to the opportunity you created and click Quotes and Order subtab and verify that the Create Version menu item is disabled for sales order named Quote1.