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.

  1. Navigate to the Manage Standard Lookups task in Setup and Maintenance.

  2. Search for the CPQ Action Menu Control in the Meaning lookup type.

  3. Set the order of the values to the order in which you want them to appear in the Actions menu.

  4. 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:

  1. Ensure you're working in an active sandbox.

  2. Click Navigator > Configuration > Application Composer .

  3. Navigate to Sales Orders in Standard Objects.

  4. Expand Sales Orders.

  5. Click Server Scripts.

  6. Click Object Functions.

  7. Click Add in the Action drop-down list.

  8. 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;

  9. Click Save and Close.

  10. 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.

  1. Ensure you're working in an active sandbox.

  2. Click Navigator > Configuration > Application Composer .

  3. Navigate to Sales Orders in Standard Objects.

  4. Expand Sales Orders.

  5. Click Server Scripts.

  6. Click Object Functions.

  7. Click the Create icon to add a new object function.

  8. In the Create Object Function page, do as follows:

    1. Enter cpqActionMenuPreRender in the Function Name field.

    2. Select Map in the Returns field.

    3. 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;
  9. Click Save and Close.

  10. Create an opportunity and post sales order using REST.

  11. 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.