Version: eXtendPresentation 1.3.6.14 and above
Audience: Administrator, Developer

Overview

eXtendPresentation enables you to include extra item information in a custom label row, along with a comment section, using SuiteScript functional hooks.

The configuration and usage of the hook function are explained below.

Configuration

The function exposed for this feature is called getItemCommentAndCustomLabels(). To configure this function, you will need to make changes in the suite_presentation_transformers.js file.

Here is an example scenario to explain how to configure this function:

Suppose you want to display additional pricing information in a custom label row and source the sales description from the item's comment section in the Presentation Modal.

To achieve this, define your function in the following format:

/**
 * @param {Object} args
 * @prop  {Array} args.searchResults - Array of item Pricing search results
 */
function getItemCommentAndCustomLabels(args) {
    var searchResults = args.searchResults;
    var itemComments;
    var customLabelAndValues = {
      'customLabels': {}
    };

    searchResults.forEach(function(item, index) {

      if (!itemComments) {
        itemComments = item.getValue({ name: 'salesdescription' }) || item.getValue({ name: 'displayname' });
      }

      customLabelAndValues.customLabels['Price'] = customLabelAndValues.customLabels['Price'] || {};
      customLabelAndValues.customLabels['Price']['userEntryLabel' + (index + 1)] = item.getValue({ name: 'unitprice', join: 'pricing' });

      customLabelAndValues.customLabels['Quantity'] = customLabelAndValues.customLabels['Quantity'] || {};
      customLabelAndValues.customLabels['Quantity']['userEntryLabel' + (index + 1)] = item.getValue({ name: 'minimumquantity', join: 'pricing' });

    });

    return {
      itemComments: itemComments,
      customLabelAndValues: customLabelAndValues
    };
  }

After defining this function in the transformers file, the additional custom label lines and comment section will source the configured values.
Image Placeholder