How do I change the width of a drawer in Oracle Sales in the Redwood UX?

Here's how to change the width of the drawer displayed by a smart action, such as Create Account. In this example and accompanying video available on Oracle Cloud Customer Connect, you learn how to expand the drawer over four columns so you can display a large number of fields without scrolling. With 4 drawer sizes available, you can use the same steps to shrink a drawer instead.

Here are the setup steps and sample code included in the Change Drawer Size video.

  1. Obtain the ID of the smart action that opens the drawer.

    1. Open Application Composer outside the sandbox and click Smart Actions.
    2. Search for the action and drill-down.
    3. On the Review and Submit page, copy the ID from the Action ID field.
  2. Open Visual Builder Studio and select the dynamic layout page. For Accounts, click the Layouts tab and then click the Customer Experience (CX) > Sales > Accounts.
  3. In the main right-hand section of the page, click the Event Listener tab.
  4. Click the + Event Listener button.
  5. Click the accountsOnBeforeInvokeSmartActionEvent event.
  6. Open the action chain code view.
  7. Here's sample code you can modify and add.
    
    if (event.action.UserActionName === 'SDA-CreateAccount-ORAGLOBAL') {
        return {
            Continue: true,
            actionConfig: {
                drawerProperties: {
                    drawerSize: 'xl'
                    }
                }
            }

    'SDA-CreateAccount-ORAGLOBAL' is the Action ID.

    Entering drawerSize: 'xl' expands the drawer across 4 columns. By default, the drawer size is set to 'lg'. Other available drawer sizes are: 'sm' and 'md'.

  8. Click the Preview button to test.