Edit opportunity revenue lines using Inline editing

The inline editing feature for opportunity revenue lines allows users to quickly and efficiently update revenue details directly within Redwood Sales. This intuitive functionality simplifies the editing process, reducing the time and effort required for adjustments while ensuring data accuracy and enhancing user productivity.

This feature enhances efficiency by allowing users to quickly update opportunity revenue lines directly within the interface, saving time and reducing the need for complex navigation. By streamlining the editing process, it improves data accuracy, accelerates decision-making, and boosts overall productivity, enabling sales teams to focus on closing deals faster.

Steps to Enable

Leverage the Visual Builder Studio to expose your applications. To learn more about extending your application using Visual Builder, visit Oracle Help Center > your apps service area of interest > Books > Configuration and Extension.

Enable Inline Edit  with Visual Builder Extension

  • Enabled Inline Edit on Revenue subview: Update extension variable "enableInlineEdit" on opportunity-detail page, value to "true"
  • Enabled Inline Edit on Product Catalog, for Add Products scenario: Update extension variable "enableInlineEdit" on product-catalog page, value to "true

Example Use Case Support:

Use Case:When Product Group is chosen in picker, populate Type and Wrokload or any custom attributes

Uptake Steps:

  • Clone Opportunity Revenue Subview layout
  • Include required attribute in layout.
  • Create a new Field Template for ProductGroup to support Smart Picker.
  • Write a javascript function for Field trigger and Add required logic.
  • Write the JS function attached in picker template.
  • Write any other Smart Picker javascript methods

Sample Code Block for Picker Functions:

Field Template for Product Group:

<template id="inlineProductGepTemplate">
 <oj-bind-if test="[[ $cell.mode === 'edit' ]]">
      <div
        :style.display="[[($functions.isAttributeDisplayable($componentContext, 'ProdGroupName')) ? 'flex' : 'none']]">
        <oj-cx-es-smart-picker extension-id="oracle_cx_digitalsalesUI"
          :id="[['productGroupPicker' + $value.RevnId() + $uniqueId ]]" class="oj-flex-item oj-sm-12 oj-md-12"
          columns="[[ ['Name'] ]]" key="ProdGroupId"
          :title="{{ $value.ProdGroupName }}"
          entity-name="[[ $metadata.ProdGroupId.extension.SmartPickerEntityName ]]"
          filter-array="[[ $functions.getProductGroupPickerFilterData($componentContext) ]]"
          readonly="[[$functions.isVirtualFieldReadonly($componentContext, $metadata.ProdGroupName, 'ProdGroupName')]]"
          is-create-enabled="false" selected-record-id="{{ $value.ProdGroupId }}"
          on-selected-record-id-changed="[[$functions.prodGroupFieldUpdateTrigger($dynamicLayoutContext,$componentContext.parentObjectData,event) ]]"
          selected-record-display-name="{{ $value.ProdGroupName }}"
          get-back-attribute-list="[[ ['Name_localizedValue'] ]]"
          on-get-back-attribute-values-changed="[[function(event, data) { $functions.setTablePickerDisplayName(event, data, $dynamicLayoutContext, 'ProdGroupName') } ]]"
          data-oj-field="ProdGroupName" required="[[ $metadata.ProdGroupId.required ]]"
          translation-bundles="[[{srGlobal: $translations.srGlobal, elasticSearchBundle: $translations.elasticSearchBundle}]]"
          is-saved-search-enabled="false">
        </oj-cx-es-smart-picker>
  
        <oj-menu-button class="oj-flex-bar-end oj-sm-padding-1x-start" id="territory_menu_ProdGroupName"
          :aria-label="[[$metadata.ProdGroupName.labelHint+ ' - Actions']]"
          :style.display="[[ $functions.isVirtualFieldReadonly($componentContext, $metadata.ProdGroupName, 'ProdGroupName') ? 'none' : $functions.hideTerritoryMenu($componentContext) ? 'none' : 'block' ]]"
          style="height:var(--oj-text-field-inside-edge-height);box-shadow:0 0 4px 0 hsla(30,8.3%,9.4%,.1), 0 1px 2px 0 hsla(30,8.3%,9.4%,.2);"
          display="icons">
          <oj-menu slot="menu" on-oj-action="[[ $functions.updateProductSmartPicker]]">
            <oj-option value="[['DisableTerritory'+ '_' + 'productGroupPicker'+ $value.RevnId() + $uniqueId]]"
              id="DisableTerritory_productGroupPicker">
              <span class="oj-ux-ico-cart-empty" slot="startIcon"></span>
              <oj-bind-text
                value="Clear Filter">
              </oj-bind-text>
            </oj-option>
            <oj-option value="[['EnableTerritory'+ '_' + 'productGroupPicker'+ $value.RevnId() + $uniqueId]]"
              disabled="[[ $functions.disableTerritoryOption($componentContext)]]"
              id="EnableTerritory_productGroupPicker">
              <span class="oj-ux-ico-search-list" slot="startIcon"></span>
              <oj-bind-text value="Filter By Territory"></oj-bind-text>
            </oj-option>
          </oj-menu>
          <span class="oj-ux-ico-overflow-h" slot="endIcon"></span>
        </oj-menu-button>
      </div>
    </oj-bind-if>
    <oj-bind-if test="[[ $cell.mode === 'navigation' ]]">
      <div class="oj-fa-digital-sales-cx-iss-truncate-long-text" :title="[[ $value.ProdGroupName ]]">
        <oj-bind-text value="[[ $value.ProdGroupName ]]"></oj-bind-text>
      </div>
    </oj-bind-if>
</template>


Field Trigger Javascript Function:

Note: Import for RestHelper is required: 'vb/helpers/rest'
*** dynamic table productgroup field trigger function.***/
<template id="inlineProductGepTemplate">
 <oj-bind-if test="[[ $cell.mode === 'edit' ]]">
      <div
        :style.display="[[($functions.isAttributeDisplayable($componentContext, 'ProdGroupName')) ? 'flex' : 'none']]">
        <oj-cx-es-smart-picker extension-id="oracle_cx_digitalsalesUI"
          :id="[['productGroupPicker' + $value.RevnId() + $uniqueId ]]" class="oj-flex-item oj-sm-12 oj-md-12"
          columns="[[ ['Name'] ]]" key="ProdGroupId"
          :title="{{ $value.ProdGroupName }}"
          entity-name="[[ $metadata.ProdGroupId.extension.SmartPickerEntityName ]]"
          filter-array="[[ $functions.getProductGroupPickerFilterData($componentContext) ]]"
          readonly="[[$functions.isVirtualFieldReadonly($componentContext, $metadata.ProdGroupName, 'ProdGroupName')]]"
          is-create-enabled="false" selected-record-id="{{ $value.ProdGroupId }}"
          on-selected-record-id-changed="[[$functions.prodGroupFieldUpdateTrigger($dynamicLayoutContext,$componentContext.parentObjectData,event) ]]"
          selected-record-display-name="{{ $value.ProdGroupName }}"
          get-back-attribute-list="[[ ['Name_localizedValue'] ]]"
          on-get-back-attribute-values-changed="[[function(event, data) { $functions.setTablePickerDisplayName(event, data, $dynamicLayoutContext, 'ProdGroupName') } ]]"
          data-oj-field="ProdGroupName" required="[[ $metadata.ProdGroupId.required ]]"
          translation-bundles="[[{srGlobal: $translations.srGlobal, elasticSearchBundle: $translations.elasticSearchBundle}]]"
          is-saved-search-enabled="false">
        </oj-cx-es-smart-picker>
  
        <oj-menu-button class="oj-flex-bar-end oj-sm-padding-1x-start" id="territory_menu_ProdGroupName"
          :aria-label="[[$metadata.ProdGroupName.labelHint+ ' - Actions']]"
          :style.display="[[ $functions.isVirtualFieldReadonly($componentContext, $metadata.ProdGroupName, 'ProdGroupName') ? 'none' : $functions.hideTerritoryMenu($componentContext) ? 'none' : 'block' ]]"
          style="height:var(--oj-text-field-inside-edge-height);box-shadow:0 0 4px 0 hsla(30,8.3%,9.4%,.1), 0 1px 2px 0 hsla(30,8.3%,9.4%,.2);"
          display="icons">
          <oj-menu slot="menu" on-oj-action="[[ $functions.updateProductSmartPicker]]">
            <oj-option value="[['DisableTerritory'+ '_' + 'productGroupPicker'+ $value.RevnId() + $uniqueId]]"
              id="DisableTerritory_productGroupPicker">
              <span class="oj-ux-ico-cart-empty" slot="startIcon"></span>
              <oj-bind-text
                value="Clear Filter">
              </oj-bind-text>
            </oj-option>
            <oj-option value="[['EnableTerritory'+ '_' + 'productGroupPicker'+ $value.RevnId() + $uniqueId]]"
              disabled="[[ $functions.disableTerritoryOption($componentContext)]]"
              id="EnableTerritory_productGroupPicker">
              <span class="oj-ux-ico-search-list" slot="startIcon"></span>
              <oj-bind-text value="Filter By Territory"></oj-bind-text>
            </oj-option>
          </oj-menu>
          <span class="oj-ux-ico-overflow-h" slot="endIcon"></span>
        </oj-menu-button>
      </div>
    </oj-bind-if>
    <oj-bind-if test="[[ $cell.mode === 'navigation' ]]">
      <div class="oj-fa-digital-sales-cx-iss-truncate-long-text" :title="[[ $value.ProdGroupName ]]">
        <oj-bind-text value="[[ $value.ProdGroupName ]]"></oj-bind-text>
      </div>
    </oj-bind-if>
</template>