Customer Part Number Implementation Scripts

jj_cs_cpnautofill_cocun10.js

/**

 * @NApiVersion 2.1

 * @NScriptType ClientScript

 * @NModuleScope SameAccount

 */

/************************************************************************************************

 * Commander Company LLC-US-NS

 * 

 * COCUN-10 Implement Auto population of CPN in Sales order and Invoice in UI Context.

 * **********************************************************************************************

 *Date Created: 31-Dec-2024

 *Created By: JJ0281, Jobin & Jismi IT Services LLP

 *

 *Description : The CPN field will automatically populate on the sales order and invoice line when an item is 

 *added with the help of client script. 

 *

 *

 * 

 * REVISION HISTORY

 *Revision 1.0 ${31-12-2024} : Created by JJ0281.  COCUN-10

 *

 *

 *

 ***********************************************************************************************/

define([‘N/search’],

  /**  

   * @param{search} search

   */

  function (search) {

    ‘use strict’;

    /**

    * Retrieves the internal ID of the Customer Part Number record in NetSuite 

    * that matches the given customer and item name.

    *     

    * @param {string} customerName – The internal ID of the customer record to filter by.

    * @param {string} itemName – The internal ID of the item record to filter by.

    * @returns {number|null} – The internal ID of the matching Customer Part Number record, 

    *             or `null` if no match is found or an error occurs.

    **/

    function getCustomerPartNumber(customerName, itemName) {

      try {

        let id = 0;

        let customrecordCustomerpartnumberSearchObj = search.create({

          type: “customrecord_customerpartnumber”,

          filters:

            [

              [“custrecord_cpn_customer”, “anyof”, customerName],

              “AND”,

              [“custrecord_cpn_item”, “anyof”, itemName],

              “AND”,

              [“isinactive”, “is”, “F”]

            ],

          columns:

            [

              search.createColumn({ name: “name”, label: “Name” })

            ]

        });

        customrecordCustomerpartnumberSearchObj.run().each(function (result) {

          id = result.id;

          return false;

        });

        return id;

      } catch (e) {

        console.log(‘error @ getCustomerPartNumber’, e.message);

        return null;

      }

    }

    function setCustomerPartNumber(scriptContext) {

      try {

        if (scriptContext.fieldId == ‘item’) {

          let currentRecord = scriptContext.currentRecord;

          let itemId = currentRecord.getCurrentSublistValue({

            sublistId: ‘item’,

            fieldId: ‘item’

          });

          let customerId = currentRecord.getValue({

            fieldId: ‘entity’

          });

          if (itemId && customerId) {

            let cpn = getCustomerPartNumber(customerId, itemId);

            currentRecord.setCurrentSublistValue({

              sublistId: ‘item’,

              fieldId: ‘custcol_customer_part_number’,

              value: cpn || ”,

              ignoreFieldChange: true

            });

          }

        }

      } catch (e) {

        log.error(‘error @ setCustomerPartNumber’, e.message);

      }

    }

    /**

     * Function to be executed when field is changed.

     *

     * @param {Object} scriptContext

     * @param {Record} scriptContext.currentRecord – Current form record

     * @param {string} scriptContext.sublistId – Sublist name

     * @param {string} scriptContext.fieldId – Field name

     * @param {number} scriptContext.lineNum – Line number. Will be undefined if not a sublist or matrix field

     * @param {number} scriptContext.columnNum – Line number. Will be undefined if not a matrix field

     *

     * @since 2015.2

     */

    function fieldChanged(scriptContext) {

      try {

        setCustomerPartNumber(scriptContext);

      } catch (e) {

        log.error(‘error @ fieldChanged:’, e.message);

      }

    }

     

    return {

      fieldChanged: fieldChanged

    };

  });

jj_cs_cpnvalidation_cocun8

/**

 * @NApiVersion 2.1

 * @NScriptType ClientScript

 * @NModuleScope SameAccount

 */

/************************************************************************************************

 * Commander Company LLC-US-NS

 * 

 * COCUN-8 Implement the Validation of Customer Part Number Records in UI Context

 * **********************************************************************************************

 *Date Created: 27-Dec-2024

 *Created By: JJ0281, Jobin & Jismi IT Services LLP

 *

 *Description : This script validates Customer Part Number (CPN) records in UI contexts by enforcing uniqueness (no duplicate active CPNs for 

 *the same item and customer) and format compliance (alphanumeric with dashes, no spaces), providing error alerts for violations. 

 *

 *

 * 

 * REVISION HISTORY

 *Revision 1.0 ${27-12-2024} : Created by JJ0281.  COCUN-8

 *

 *

 *

 ***********************************************************************************************/

define([‘N/search’],

  /**   

   * @param{search} search   

   */

  function (search) {

    ‘use strict’;

    const CPNFIELDID = ‘name’;

    const CPNITEMFIELDID = ‘custrecord_cpn_item’;

    const CPNCUSTOMERFIELDID = ‘custrecord_cpn_customer’;

    let Mode;

    /**

    * Validates the value of a specified field to ensure it is alphanumeric and does not contain spaces.

    * If the value is invalid, an alert is displayed, and the field is cleared.

    * 

    * @param {string} fieldId – The ID of the field to validate.

    * @param {object} currentRecord – The current record object where the field is being edited.

    * @returns {void} Logs error details if an exception occurs.

    */

    function checkCpnValid(fieldId, currentRecord) {

      try {

        let fieldValue = currentRecord.getValue({ fieldId: fieldId });

        console.log(‘fieldValue’, fieldValue);

        if (fieldValue) {

          if (fieldValue && !isValidValue(fieldValue)) {

            alert(‘The field contains non-alphanumeric characters. Please use only alphanumeric characters.’);

            currentRecord.setValue({ fieldId: fieldId, value: ” });

          }

        }

      } catch (e) {

        log.error(‘error@ checkcpn’, e.message);

      }

    }

    /**

    * Validates whether a given value is alphanumeric and allows specific characters (“/” and “-“).

    * 

    * @param {string} value – The value to be validated.

    * @returns {boolean} Returns true if the value matches the allowed pattern; otherwise, false.

    */

    function isValidValue(value) {

      try {

        let regex = /^[a-zA-Z0-9/-]+$/;

        return regex.test(value);

      } catch (er) {

        log.error(‘ error @ isValidValue’, er.message);

        return null;

      }

    }

    /**

    * Performs a saved search on the custom record “Customer Part Number” to find records matching the provided customer and item while 

    * ensuring the records are not inactive.Retrieves the count of existing Customer Part Number (CPN) records for a specific customer and item.

    * 

    * @param {object} recordObj – The current record object containing the customer and item information.

    * @returns {number|null} The count of matching CPN records if successful; null in case of an error.

    *  

    */

    function getExistingCpn(recordObj) {

      try {

        let itemId = recordObj.getValue({ fieldId: “custrecord_cpn_item” });

        let customerId = recordObj.getValue({ fieldId: “custrecord_cpn_customer” });

        let customrecordCustomerpartnumberSearchObj = search.create({

          type: “customrecord_customerpartnumber”,

          filters:

            [

              [“custrecord_cpn_customer”, “anyof”, customerId],

              “AND”,

              [“custrecord_cpn_item”, “anyof”, itemId],

              “AND”,

              [“isinactive”, “is”, “F”]

            ],

          columns:

            [

              search.createColumn({ name: “name”, label: “Name” })

            ]

        });

        let searchResultCount = customrecordCustomerpartnumberSearchObj.runPaged().count;

        return searchResultCount;

      } catch (e) {

        log.error(‘error @ getExistingCpn’, e.message);

        return null;

      }

    }

    /**

     * Function to be executed after page is initialized.

     *

     * @param {Object} scriptContext

     * @param {Record} scriptContext.currentRecord – Current form record

     * @param {string} scriptContext.mode – The mode in which the record is being accessed (create, copy, or edit)

     *

     * @since 2015.2

     */

    function pageInit(scriptContext) {

      console.log(‘pageInit’);

      Mode = scriptContext.mode;

    }

    function saveValidation(recordObj) {

      try {

        let isInactive = recordObj.getValue({ fieldId: ‘isinactive’ });

        if (isInactive) return true;

        let existingCpns = getExistingCpn(recordObj);

        log.debug(‘existingCpns’, existingCpns);

        switch (Mode) {

          case ‘create’:

          case ‘copy’:

            if (existingCpns === 0) {

              return true;

            } else {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              return false;

            }

          case ‘edit’:

            if (existingCpns <= 1) {

              return true;

            } else {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              return false;

            }

          default:

            console.log(“Unhandled mode:”, Mode);

            return true;

        }

      } catch (e) {

        log.error(‘error @ saveValidation’, e.message);

        return true;

      }

    }

    /**

     * Function to be executed when field is changed.

     *

     * @param {Object} scriptContext

     * @param {Record} scriptContext.currentRecord – Current form record

     * @param {string} scriptContext.sublistId – Sublist name

     * @param {string} scriptContext.fieldId – Field name

     * @param {number} scriptContext.lineNum – Line number. Will be undefined if not a sublist or matrix field

     * @param {number} scriptContext.columnNum – Line number. Will be undefined if not a matrix field

     *

     * @since 2015.2

     */

    function fieldChanged(scriptContext) {

      try {

        let currentRecord = scriptContext.currentRecord;

        let fieldId = scriptContext.fieldId;         

        let cpnItem = currentRecord.getValue({ fieldId: CPNITEMFIELDID });

        let cpnCustomer = currentRecord.getValue({ fieldId: CPNCUSTOMERFIELDID });

        if (Mode == ‘create’ || Mode == ‘copy’) {

          if (fieldId === CPNFIELDID) {

            checkCpnValid(fieldId, currentRecord);

            if (cpnItem && cpnCustomer) {

              let cpnExist = getExistingCpn(currentRecord);

              if (cpnExist > 0) {

                alert(‘The customer part number already exists for this customer. Select another item/customer.’);

                currentRecord.setValue({ fieldId: CPNCUSTOMERFIELDID, value: ” });

              }

            }

          }

          if (fieldId === CPNCUSTOMERFIELDID && cpnItem) {

            let cpnExist = getExistingCpn(currentRecord);

            if (cpnExist > 0) {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              currentRecord.setValue({ fieldId: CPNCUSTOMERFIELDID, value: ” });

            }

          }

          if (fieldId === CPNITEMFIELDID && cpnCustomer) {

            let cpnExist = getExistingCpn(currentRecord);

            if (cpnExist > 0) {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              currentRecord.setValue({ fieldId: CPNCUSTOMERFIELDID, value: ” });

            }

          }

        }

        if (Mode == ‘edit’) {

          if (fieldId === CPNFIELDID) {

            checkCpnValid(fieldId, currentRecord);

            if (cpnItem && cpnCustomer) {

              let cpnExist = getExistingCpn(currentRecord);

              if (cpnExist > 1) {

                alert(‘The customer part number already exists for this customer. Select another item/customer.’);

                currentRecord.setValue({ fieldId: CPNCUSTOMERFIELDID, value: ” });

              }

            }

          }

          if (fieldId === CPNCUSTOMERFIELDID && cpnItem) {

            let cpnExist = getExistingCpn(currentRecord);

            if (cpnExist > 1) {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              currentRecord.setValue({ fieldId: CPNCUSTOMERFIELDID, value: ” });

            }

          }

          if (fieldId === CPNITEMFIELDID && cpnCustomer) {

            console.log(‘fieldId === CPNITEMFIELDID && cpnCustomer’)

            let cpnExist = getExistingCpn(currentRecord);

            console.log(‘cpnExist’, cpnExist);

            if (cpnExist > 1) {

              alert(‘The customer part number already exists for this customer. Select another item/customer.’);

              currentRecord.setValue({ fieldId: CPNITEMFIELDID, value: ” });

            }

          }

        }

      } catch (e) {

        log.error(‘error @ fieldChanged:’, e.message);

      }

    }

    /**

     * Validation function to be executed when record is saved.

     *

     * @param {Object} scriptContext

     * @param {Record} scriptContext.currentRecord – Current form record

     * @returns {boolean} Return true if record is valid

     *

     * @since 2015.2

     */

    function saveRecord(scriptContext) {

      try {

        let currentRecord = scriptContext.currentRecord;

        let canSave = saveValidation(currentRecord);

        return canSave;

      } catch (e) {

        log.error(“error @ saverecord”, e.message);

        return true;

      }

    }

    return {

      pageInit: pageInit,

      fieldChanged: fieldChanged,

      saveRecord: saveRecord,

    };

  });

jj_ue_cpnautofill_cocun11

/**

 * @NApiVersion 2.1

 * @NScriptType UserEventScript

 */

/************************************************************************************************

 * Commander Company LLC-US-NS

 * 

 * COCUN-11 Implement Auto population of CPN in Sales order and Invoice in Non-UI Context.

 * **********************************************************************************************

 *Date Created: 31-Dec-2024

 *Created By: JJ0281, Jobin & Jismi IT Services LLP

 *

 *Description : The CPN field will automatically populates on the sales order and invoice on save.

 *

 *

 * 

 * REVISION HISTORY

 *Revision 1.0 ${31-12-2024} : Created by JJ0281.  COCUN-11

 *

 *

 *

 ***********************************************************************************************/

define([‘N/search’],

  /**  

 * @param{search} search

 */

  (search) => {

    ‘use strict’;

    /**

    * Retrieves a list of Customer Part Numbers (CPNs) associated with a given customer and item details.

    *

    * @param {string|number} customerId – The internal ID of the customer to filter by.

    * @param {string|number|Array} itemDetails – The internal ID(s) of the item(s) to filter by.

    * @returns {Array} An array of objects containing the following CPN details:

    *  – {string} cpn: The Customer Part Number (Name).

    *  – {string} id: The internal ID of the custom record.

    *  – {string} itemId: The internal ID of the item associated with the CPN.

    */

    function getCpn(customerId, itemDetails) {

      try {

        let cpnArray = [];

        let customrecordCustomerpartnumberSearchObj = search.create({

          type: “customrecord_customerpartnumber”,

          filters:

            [

              [“custrecord_cpn_customer”, “anyof”, customerId],

              “AND”,

              [“custrecord_cpn_item”, “anyof”, itemDetails],

              “AND”,

              [“isinactive”, “is”, “F”]

            ],

          columns:

            [

              search.createColumn({ name: “name”, label: “Name” }),

              search.createColumn({ name: “custrecord_cpn_item”, label: “Item” })

            ]

        });

        customrecordCustomerpartnumberSearchObj.run().each(function (result) {

          let details = {};

          details.cpn = result.getValue({ name: “name” });

          details.id = result.id;

          details.itemId = result.getValue({ name: “custrecord_cpn_item” });

          cpnArray.push(details);

          return true;

        });

        return cpnArray;

      } catch (e) {

        log.error(‘error @ getCPN’, e.message);

        return [];

      }

    }  

    /**

    * Checks if the given object is empty, undefined, or null.

    * @param {any} obj – The object to check.

    * @returns {boolean} – Returns true if the object is empty, undefined, or null; otherwise, false.

    */

       function isObjectEmptyOrNull(obj) {

        try{

        return (

          obj === undefined ||

          obj === null ||

          (typeof obj === ‘object’ && !Array.isArray(obj) && Object.keys(obj).length === 0)

        );

      } catch(e){

        log.error(‘isObjectEmptyOrNull’, e.message);

        return false;

      }

      }

   

    /**

     * Defines the function definition that is executed before record is submitted.

     * @param {Object} scriptContext

     * @param {Record} scriptContext.newRecord – New record

     * @param {Record} scriptContext.oldRecord – Old record

     * @param {string} scriptContext.type – Trigger type; use values from the context.UserEventType enum

     * @since 2015.2

     */

    const beforeSubmit = (scriptContext) => {

      try {

        if (scriptContext.type === scriptContext.UserEventType.CREATE || scriptContext.type === scriptContext.UserEventType.EDIT || scriptContext.type === scriptContext.UserEventType.COPY ) {

          let newRecord = scriptContext.newRecord;

          let customerId = newRecord.getValue({ fieldId: ‘entity’ });

          if (!customerId) {

            log.debug(‘Customer ID Missing’, ‘Skipping CPN processing due to missing customer.’);

            return;

          }

          let itemDetails = [];

          let lineCount = newRecord.getLineCount({ sublistId: ‘item’ });

          for (let i = 0; i < lineCount; i++) {

            let itemId = newRecord.getSublistValue({

              sublistId: ‘item’,

              fieldId: ‘item’,

              line: i

            });

            if (!itemDetails.includes(itemId)) {

              itemDetails.push(itemId);

            }

          }

          if (itemDetails.length === 0) {

            log.debug(‘Item Details Missing’, ‘No items found on the sales order.’);

            return;

          }

          let cpnDetails = getCpn(customerId, itemDetails);          

          if (cpnDetails.length === 0) {

            log.debug(‘No CPN Details Found’, `No CPN details found for customer ${customerId}`);

            for (let i = 0; i < lineCount; i++) {

              newRecord.setSublistValue({

                sublistId: ‘item’,

                fieldId: ‘custcol_customer_part_number’,

                line: i,

                value: ”

              });

            }

            return;

          }

          else {

            for (let i = 0; i < lineCount; i++) {

              let currentItemId = newRecord.getSublistValue({

                sublistId: ‘item’,

                fieldId: ‘item’,

                line: i

              });

              let cpnDetail = cpnDetails.find(detail => detail.itemId === currentItemId);

              let cpnsDataValid = isObjectEmptyOrNull(cpnDetail);

              if (cpnsDataValid === false) {                             

                newRecord.setSublistValue({

                  sublistId: ‘item’,

                  fieldId: ‘custcol_customer_part_number’,

                  line: i,

                  value: cpnDetail.id

                });

              }

              else {                

                newRecord.setSublistValue({

                  sublistId: ‘item’,

                  fieldId: ‘custcol_customer_part_number’,

                  line: i,

                  value: ”

                });

              }

            }

          }                

        }

      } catch (e) {

        log.error({

          title: ‘Error @ afterSubmit’,

          details: e.message

        });

      }

    }

    return {

      beforeSubmit

    }

  });

jj_ue_cpnvalidation_cocun9

/**

 * @NApiVersion 2.1

 * @NScriptType UserEventScript

 */

/************************************************************************************************

 * Commander Company LLC-US-NS

 * 

 * COCUN-9 Implement the Validation of Customer Part Number Records in all Contexts

 * **********************************************************************************************

 *Date Created: 27-Dec-2024

 *Created By: JJ0281, Jobin & Jismi IT Services LLP

 *

 *Description : This script validates Customer Part Number (CPN) records in all contexts by enforcing uniqueness (no duplicate active CPNs for 

 *the same item and customer) and format compliance (alphanumeric with dashes, no spaces), providing error alerts for violations. 

 *

 *

 * 

 * REVISION HISTORY

 *Revision 1.0 ${27-12-2024} : Created by JJ0281.  COCUN-8

 *

 *

 *

 ***********************************************************************************************/

define([‘N/search’, ‘N/error’],

  /**

 * @param{search} search

 * @param{error} error

 */

  (search, error) => {

    ‘use strict’;

    const CPNFIELDID = ‘name’;

    /**

      * Retrieves the count of existing Customer Part Number (CPN) records for a specific customer and item.

      * 

      * @param {object} recordObj – The current record object containing the customer and item information.

      * @returns {number|null} The count of matching CPN records if successful; null in case of an error.

      * 

      * @description

      * – Performs a saved search on the custom record “Customer Part Number” to find records

      *  matching the provided customer and item while ensuring the records are not inactive.

      * – Returns the total count of matching records.

      * – Logs an error and returns null in case of an exception.

    */

    function getExistingCpn(itemId, customerId) {

      try {        

        let customrecordCustomerpartnumberSearchObj = search.create({

          type: “customrecord_customerpartnumber”,

          filters:

            [

              [“custrecord_cpn_customer”, “anyof”, customerId],

              “AND”,

              [“custrecord_cpn_item”, “anyof”, itemId],

              “AND”,

              [“isinactive”, “is”, “F”]

            ],

          columns:

            [

              search.createColumn({ name: “name”, label: “Name” }),

              search.createColumn({ name: “custrecord_cpn_item”, label: “Item” }),

              search.createColumn({ name: “custrecord_cpn_customer”, label: “Customer” })

            ]

        });

        let searchResultCount = customrecordCustomerpartnumberSearchObj.runPaged().count;

        return searchResultCount;

      } catch (e) {

        log.error(‘error @ getExistingCpn’, e.message);

        return null;

      }

    }

    /**

      * Validates the value of a specified field to ensure it is alphanumeric and does not contain spaces.

      * If the value is invalid, an alert is displayed, and the field is cleared.

      * 

      * @param {string} fieldId – The ID of the field to validate.

      * @param {object} currentRecord – The current record object where the field is being edited.

      * @returns {void} Logs error details if an exception occurs.

      */

    function validateCpnField(recordObj, fieldId) {

      let fieldValue = recordObj.getValue(fieldId);

      if (!fieldValue) return;

      if (!isValidValue(fieldValue)) {

        let message = ‘The field contains invalid characters. Use only alphanumeric, “/”, or “-“.’;

        throw error.create({

          name: ‘Invalid Characters’,

          message: message,

          notifyOff: true

        });

      }

    }

    /**

      * Validates whether a given value is alphanumeric and allows specific characters (“/” and “-“).

      * 

      * @param {string} value – The value to be validated.

      * @returns {boolean} Returns true if the value matches the allowed pattern; otherwise, false.

      */

    function isValidValue(value) {

      try {

        let regex = /^[a-zA-Z0-9/-]+$/;

        return regex.test(value);

      } catch (er) {

        log.error(‘ error @ isValidValue’, er.message);

        return null;

      }

    }

    /**

    * Throws a validation error when a duplicate Customer Part Number (CPN) is detected.

    *

    * @throws {Error} – A custom error with name ‘CPN_ALREADY_EXISTS’ and a descriptive message.

    */

    function throwValidError() {

      throw error.create({

        name: ‘CPN_ALREADY_EXISTS’,

        message: ‘Customer Part Number already exists for the selected item and customer.’,

        notifyOff: true

      });

    }

    /**

      * Defines the function definition that is executed before record is submitted.

      * @param {Object} scriptContext

      * @param {Record} scriptContext.newRecord – New record

      * @param {Record} scriptContext.oldRecord – Old record

      * @param {string} scriptContext.type – Trigger type; use values from the context.UserEventType enum

      * @since 2015.2

      */

    const beforeSubmit = (scriptContext) => {

      let newRecordObj = scriptContext.newRecord;

      let nisinactive = newRecordObj.getValue({ fieldId: ‘isinactive’ });

      if (nisinactive) return;

      let itemid = newRecordObj.getValue({ fieldId: “custrecord_cpn_item” });

      let customerid = newRecordObj.getValue({ fieldId: “custrecord_cpn_customer” });

      if (scriptContext.type === scriptContext.UserEventType.CREATE || scriptContext.type === scriptContext.UserEventType.COPY) {

        validateCpnField(newRecordObj, CPNFIELDID);

        let existingcpns = getExistingCpn(itemid, customerid);

        if (existingcpns > 0) {

          throwValidError();

        }

      }

      if (scriptContext.type === scriptContext.UserEventType.EDIT) {        

        let oldRecordObj = scriptContext.oldRecord;

        let oitemid = oldRecordObj.getValue({ fieldId: “custrecord_cpn_item” });

        let ocustomerid = oldRecordObj.getValue({ fieldId: “custrecord_cpn_customer” });

        let ocpn = oldRecordObj.getValue({ fieldId: CPNFIELDID });

        let ncpn = newRecordObj.getValue({ fieldId: CPNFIELDID });

        if (!nisinactive) {

          if (ocpn == ncpn && ocustomerid == customerid && oitemid == itemid)

            return;

          else if (ocpn != ncpn) {

            // log.debug(“1”);

            validateCpnField(newRecordObj, CPNFIELDID);

            let existingcpns = getExistingCpn(itemid, customerid);

            if (!nisinactive && existingcpns > 1) {

              // log.debug(“2”);

              throwValidError();

            }

          }

          else {

            // log.debug(“3”);

            validateCpnField(newRecordObj, CPNFIELDID);

            let existingcpns = getExistingCpn(itemid, customerid);

            if (!nisinactive && existingcpns > 0) {

              log.debug(“4”);

              throwValidError();

            }

          }

        }

        if (!nisinactive && ocpn == ncpn && (oitemid != itemid)) {

          // log.debug(“5”);

          let existingcpns = getExistingCpn(itemid, customerid);

          if (!nisinactive && existingcpns > 0) {

            // log.debug(“6”);            

            throwValidError();

          }

        }

        else

          return;

      }

      if (scriptContext.type === scriptContext.UserEventType.XEDIT) {         

        let oldRecordObj = scriptContext.oldRecord;

        let oitemid = oldRecordObj.getValue({ fieldId: “custrecord_cpn_item” });

        let ocustomerid = oldRecordObj.getValue({ fieldId: “custrecord_cpn_customer” });

        let ocpn = oldRecordObj.getValue({ fieldId: CPNFIELDID });

        let ncpn = newRecordObj.getValue({ fieldId: CPNFIELDID });

        if (!nisinactive) {

          if (ocpn == ncpn && !itemid)

            return;

          else if (ocpn != ncpn && !itemid) {

            // log.debug(“1”);

            validateCpnField(newRecordObj, CPNFIELDID);

            let existingcpns = getExistingCpn(oitemid, ocustomerid);            

            if (!nisinactive && existingcpns > 1) {

              // log.debug(“2”);

              throwValidError();

            }

          }

          else {

            // log.debug(“3”);

            validateCpnField(newRecordObj, CPNFIELDID);

            let existingcpns = getExistingCpn(itemid, ocustomerid);

            if (!nisinactive && existingcpns > 0) {

              // log.debug(“4”);

              throwValidError();

            }

          }

        }

        if (!nisinactive && ocpn == ncpn && itemid) {

          // log.debug(“5”);

          let existingcpns = getExistingCpn(itemid, ocustomerid);

          if (!nisinactive && existingcpns > 0) {

            // log.debug(“6”);            

            throwValidError();

          }

        }

        else

          return;

      }

    }

    return { beforeSubmit }

  });

Objects

custcol_customer_part_number

<transactioncolumncustomfield scriptid=”custcol_customer_part_number”>

 <accesslevel>2</accesslevel>

 <applyformatting>F</applyformatting>

 <colexpense>F</colexpense>

 <colexpensereport>F</colexpensereport>

 <colgrouponinvoices>F</colgrouponinvoices>

 <colinventoryadjustment>F</colinventoryadjustment>

 <colitemfulfillment>T</colitemfulfillment>

 <colitemfulfillmentorder>F</colitemfulfillmentorder>

 <colitemreceipt>F</colitemreceipt>

 <colitemreceiptorder>F</colitemreceiptorder>

 <coljournal>F</coljournal>

 <colkititem>F</colkititem>

 <colopportunity>F</colopportunity>

 <colpackingslip>F</colpackingslip>

 <colpickingticket>F</colpickingticket>

 <colprintflag>F</colprintflag>

 <colpurchase>F</colpurchase>

 <colreturnform>F</colreturnform>

 <colsale>T</colsale>

 <colstorewithgroups>F</colstorewithgroups>

 <coltransferorder>F</coltransferorder>

 <columncustomtransactions></columncustomtransactions>

 <defaultchecked>F</defaultchecked>

 <defaultselection></defaultselection>

 <defaultvalue></defaultvalue>

 <description></description>

 <displayheight></displayheight>

 <displaytype>NORMAL</displaytype>

 <displaywidth></displaywidth>

 <dynamicdefault></dynamicdefault>

 <encryptatrest>F</encryptatrest>

 <fieldtype>SELECT</fieldtype>

 <help></help>

 <isformula>F</isformula>

 <ismandatory>F</ismandatory>

 <label>Customer Part Number</label>

 <linktext></linktext>

 <maxlength></maxlength>

 <maxvalue></maxvalue>

 <minvalue></minvalue>

 <onparentdelete>NO_ACTION</onparentdelete>

 <searchlevel>2</searchlevel>

 <selectrecordtype>[scriptid=customrecord_customerpartnumber]</selectrecordtype>

 <showhierarchy>F</showhierarchy>

 <sourcefilterby></sourcefilterby>

 <sourcefrom></sourcefrom>

 <sourcelist></sourcelist>

 <storevalue>T</storevalue>

</transactioncolumncustomfield>

customrecord_customerpartnumber

<customrecordtype scriptid=”customrecord_customerpartnumber”>

 <accesstype>CUSTRECORDENTRYPERM</accesstype>

 <allowattachments>F</allowattachments>

 <allowinlinedeleting>T</allowinlinedeleting>

 <allowinlinedetaching>T</allowinlinedetaching>

 <allowinlineediting>T</allowinlineediting>

 <allowmobileaccess>F</allowmobileaccess>

 <allownumberingoverride>F</allownumberingoverride>

 <allowquickadd>F</allowquickadd>

 <allowquicksearch>F</allowquicksearch>

 <allowuiaccess>T</allowuiaccess>

 <customsegment></customsegment>

 <description></description>

 <enabledle>T</enabledle>

 <enablekeywords>T</enablekeywords>

 <enablemailmerge>F</enablemailmerge>

 <enablenumbering>F</enablenumbering>

 <enableoptimisticlocking>T</enableoptimisticlocking>

 <enablesystemnotes>T</enablesystemnotes>

 <hierarchical>F</hierarchical>

 <icon></icon>

 <iconbuiltin>T</iconbuiltin>

 <iconindex></iconindex>

 <includeinsearchmenu>T</includeinsearchmenu>

 <includename>T</includename>

 <isinactive>F</isinactive>

 <isordered>F</isordered>

 <numberinginit></numberinginit>

 <numberingmindigits></numberingmindigits>

 <numberingprefix></numberingprefix>

 <numberingsuffix></numberingsuffix>

 <recordname>Customer Part Number</recordname>

 <showcreationdate>F</showcreationdate>

 <showcreationdateonlist>F</showcreationdateonlist>

 <showid>F</showid>

 <showlastmodified>F</showlastmodified>

 <showlastmodifiedonlist>F</showlastmodifiedonlist>

 <shownotes>F</shownotes>

 <showowner>F</showowner>

 <showownerallowchange>F</showownerallowchange>

 <showowneronlist>F</showowneronlist>

 <customrecordcustomfields>

  <customrecordcustomfield scriptid=”custrecord_cpn_item”>

   <accesslevel>2</accesslevel>

   <allowquickadd>F</allowquickadd>

   <applyformatting>F</applyformatting>

   <checkspelling>F</checkspelling>

   <defaultchecked>F</defaultchecked>

   <defaultselection></defaultselection>

   <defaultvalue></defaultvalue>

   <description></description>

   <displayheight></displayheight>

   <displaytype>NORMAL</displaytype>

   <displaywidth></displaywidth>

   <dynamicdefault></dynamicdefault>

   <encryptatrest>F</encryptatrest>

   <fieldtype>SELECT</fieldtype>

   <globalsearch>F</globalsearch>

   <help></help>

   <isformula>F</isformula>

   <ismandatory>F</ismandatory>

   <isparent>T</isparent>

   <label>Item</label>

   <linktext></linktext>

   <maxlength></maxlength>

   <maxvalue></maxvalue>

   <minvalue></minvalue>

   <onparentdelete>SET_NULL</onparentdelete>

   <parentsubtab>[scriptid=custtab_617_11239844_564]</parentsubtab>

   <rolerestrict>F</rolerestrict>

   <searchcomparefield></searchcomparefield>

   <searchdefault></searchdefault>

   <searchlevel>2</searchlevel>

   <selectrecordtype>-10</selectrecordtype>

   <showinlist>T</showinlist>

   <sourcefilterby></sourcefilterby>

   <sourcefrom></sourcefrom>

   <sourcelist></sourcelist>

   <storevalue>T</storevalue>

   <subtab></subtab>

   <customfieldfilters>

    <customfieldfilter>

     <fldcomparefield></fldcomparefield>

     <fldfilter>STDITEMITEMTYPE</fldfilter>

     <fldfilterchecked></fldfilterchecked>

     <fldfiltercomparetype>EQ</fldfiltercomparetype>

     <fldfilternotnull>F</fldfilternotnull>

     <fldfilternull>F</fldfilternull>

     <fldfiltersel>5|1|6</fldfiltersel>

     <fldfilterval></fldfilterval>

    </customfieldfilter>

   </customfieldfilters>

  </customrecordcustomfield>

  <customrecordcustomfield scriptid=”custrecord_cpn_customer”>

   <accesslevel>2</accesslevel>

   <allowquickadd>F</allowquickadd>

   <applyformatting>F</applyformatting>

   <checkspelling>F</checkspelling>

   <defaultchecked>F</defaultchecked>

   <defaultselection></defaultselection>

   <defaultvalue></defaultvalue>

   <description></description>

   <displayheight></displayheight>

   <displaytype>NORMAL</displaytype>

   <displaywidth></displaywidth>

   <dynamicdefault></dynamicdefault>

   <encryptatrest>F</encryptatrest>

   <fieldtype>SELECT</fieldtype>

   <globalsearch>F</globalsearch>

   <help></help>

   <isformula>F</isformula>

   <ismandatory>F</ismandatory>

   <isparent>T</isparent>

   <label>Customer</label>

   <linktext></linktext>

   <maxlength></maxlength>

   <maxvalue></maxvalue>

   <minvalue></minvalue>

   <onparentdelete>SET_NULL</onparentdelete>

   <parentsubtab>ENTITYSALES</parentsubtab>

   <rolerestrict>F</rolerestrict>

   <searchcomparefield></searchcomparefield>

   <searchdefault></searchdefault>

   <searchlevel>2</searchlevel>

   <selectrecordtype>-2</selectrecordtype>

   <showinlist>T</showinlist>

   <sourcefilterby></sourcefilterby>

   <sourcefrom></sourcefrom>

   <sourcelist></sourcelist>

   <storevalue>T</storevalue>

   <subtab></subtab>

  </customrecordcustomfield>

  <customrecordcustomfield scriptid=”custrecord_cpn_subsidiary”>

   <accesslevel>2</accesslevel>

   <allowquickadd>F</allowquickadd>

   <applyformatting>F</applyformatting>

   <checkspelling>F</checkspelling>

   <defaultchecked>F</defaultchecked>

   <defaultselection></defaultselection>

   <defaultvalue></defaultvalue>

   <description></description>

   <displayheight></displayheight>

   <displaytype>LOCKED</displaytype>

   <displaywidth></displaywidth>

   <dynamicdefault></dynamicdefault>

   <encryptatrest>F</encryptatrest>

   <fieldtype>SELECT</fieldtype>

   <globalsearch>F</globalsearch>

   <help></help>

   <isformula>F</isformula>

   <ismandatory>F</ismandatory>

   <isparent>F</isparent>

   <label>Subsidiary</label>

   <linktext></linktext>

   <maxlength></maxlength>

   <maxvalue></maxvalue>

   <minvalue></minvalue>

   <onparentdelete>NO_ACTION</onparentdelete>

   <parentsubtab></parentsubtab>

   <rolerestrict>F</rolerestrict>

   <searchcomparefield></searchcomparefield>

   <searchdefault></searchdefault>

   <searchlevel>2</searchlevel>

   <selectrecordtype>-117</selectrecordtype>

   <showinlist>T</showinlist>

   <sourcefilterby></sourcefilterby>

   <sourcefrom>STDENTITYSUBSIDIARY</sourcefrom>

   <sourcelist>[scriptid=customrecord_customerpartnumber.custrecord_cpn_customer]</sourcelist>

   <storevalue>T</storevalue>

   <subtab></subtab>

  </customrecordcustomfield>

  <customrecordcustomfield scriptid=”custrecord_cpn_map_violation”>

   <accesslevel>2</accesslevel>

   <allowquickadd>F</allowquickadd>

   <applyformatting>F</applyformatting>

   <checkspelling>F</checkspelling>

   <defaultchecked>F</defaultchecked>

   <defaultselection></defaultselection>

   <defaultvalue></defaultvalue>

   <description></description>

   <displayheight></displayheight>

   <displaytype>NORMAL</displaytype>

   <displaywidth></displaywidth>

   <dynamicdefault></dynamicdefault>

   <encryptatrest>F</encryptatrest>

   <fieldtype>CHECKBOX</fieldtype>

   <globalsearch>F</globalsearch>

   <help></help>

   <isformula>F</isformula>

   <ismandatory>F</ismandatory>

   <isparent>F</isparent>

   <label>MAP Violation</label>

   <linktext></linktext>

   <maxlength></maxlength>

   <maxvalue></maxvalue>

   <minvalue></minvalue>

   <onparentdelete></onparentdelete>

   <parentsubtab></parentsubtab>

   <rolerestrict>F</rolerestrict>

   <searchcomparefield></searchcomparefield>

   <searchdefault></searchdefault>

   <searchlevel>2</searchlevel>

   <selectrecordtype></selectrecordtype>

   <showinlist>T</showinlist>

   <sourcefilterby></sourcefilterby>

   <sourcefrom></sourcefrom>

   <sourcelist></sourcelist>

   <storevalue>T</storevalue>

   <subtab></subtab>

  </customrecordcustomfield>

  <customrecordcustomfield scriptid=”custrecord_cpn_pricing_issue”>

   <accesslevel>2</accesslevel>

   <allowquickadd>F</allowquickadd>

   <applyformatting>F</applyformatting>

   <checkspelling>F</checkspelling>

   <defaultchecked>F</defaultchecked>

   <defaultselection></defaultselection>

   <defaultvalue></defaultvalue>

   <description></description>

   <displayheight></displayheight>

   <displaytype>NORMAL</displaytype>

   <displaywidth></displaywidth>

   <dynamicdefault></dynamicdefault>

   <encryptatrest>F</encryptatrest>

   <fieldtype>CHECKBOX</fieldtype>

   <globalsearch>F</globalsearch>

   <help></help>

   <isformula>F</isformula>

   <ismandatory>F</ismandatory>

   <isparent>F</isparent>

   <label>Pricing Issue</label>

   <linktext></linktext>

   <maxlength></maxlength>

   <maxvalue></maxvalue>

   <minvalue></minvalue>

   <onparentdelete></onparentdelete>

   <parentsubtab></parentsubtab>

   <rolerestrict>F</rolerestrict>

   <searchcomparefield></searchcomparefield>

   <searchdefault></searchdefault>

   <searchlevel>2</searchlevel>

   <selectrecordtype></selectrecordtype>

   <showinlist>T</showinlist>

   <sourcefilterby></sourcefilterby>

   <sourcefrom></sourcefrom>

   <sourcelist></sourcelist>

   <storevalue>T</storevalue>

   <subtab></subtab>

  </customrecordcustomfield>

 </customrecordcustomfields>  

</customrecordtype>

customscript_jj_cs_autofillcpn_cocun10

<clientscript scriptid=”customscript_jj_cs_autofillcpn_cocun10″>

 <description></description>

 <isinactive>T</isinactive>

 <name>JJ CS Auto Fill CPN COCUN- 10</name>

 <notifyadmins>F</notifyadmins>

 <notifyemails></notifyemails>

 <notifyowner>T</notifyowner>

 <notifyuser>F</notifyuser>

 <scriptfile>[/SuiteScripts/Jobin and Jismi IT Services/COCUN 21 CPN/jj_cs_cpnautofill_cocun10.js]</scriptfile>

 <scriptdeployments>

  <scriptdeployment scriptid=”customdeploy_jj_cs_autofillcpnso_cocun10″>

   <allemployees>F</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audemployee></audemployee>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>ERROR</loglevel>

   <recordtype>SALESORDER</recordtype>

   <status>RELEASED</status>

  </scriptdeployment>

  <scriptdeployment scriptid=”customdeploy_jj_cs_autofillcpn_cocun10″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>INVOICE</recordtype>

   <status>RELEASED</status>

  </scriptdeployment>

 </scriptdeployments>

</clientscript>

customscript_jj_cs_cpnvalidation_cocun8

<clientscript scriptid=”customscript_jj_cs_cpnvalidation_cocun8″>

 <description></description>

 <isinactive>F</isinactive>

 <name>JJ CS CPN Validation COCUN 8</name>

 <notifyadmins>F</notifyadmins>

 <notifyemails></notifyemails>

 <notifyowner>T</notifyowner>

 <notifyuser>F</notifyuser>

 <scriptfile>[/SuiteScripts/Jobin and Jismi IT Services/COCUN 21 CPN/jj_cs_cpnvalidation_cocun8.js]</scriptfile>

 <scriptdeployments>

  <scriptdeployment scriptid=”customdeploy_jj_cs_cpnvalidation_cocun8″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>[scriptid=customrecord_customerpartnumber]</recordtype>

   <status>RELEASED</status>

  </scriptdeployment>

 </scriptdeployments>

</clientscript>

customscript_jj_ue_cpnautofill_cocun11

<usereventscript scriptid=”customscript_jj_ue_cpnautofill_cocun11″>

 <description></description>

 <isinactive>F</isinactive>

 <name>JJ UE CPN AutoFill COCUN – 11</name>

 <notifyadmins>F</notifyadmins>

 <notifyemails></notifyemails>

 <notifyowner>T</notifyowner>

 <notifyuser>F</notifyuser>

 <scriptfile>[/SuiteScripts/Jobin and Jismi IT Services/COCUN 21 CPN/jj_ue_cpnautofill_cocun11.js]</scriptfile>

 <scriptdeployments>

  <scriptdeployment scriptid=”customdeploy_jj_ue_cpnautofillso_cocun11″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>SALESORDER</recordtype>

   <runasrole>ADMINISTRATOR</runasrole>

   <status>RELEASED</status>

  </scriptdeployment>

  <scriptdeployment scriptid=”customdeploy_jj_ue_cpnautofillin_cocun11″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>INVOICE</recordtype>

   <runasrole>ADMINISTRATOR</runasrole>

   <status>RELEASED</status>

  </scriptdeployment>

 </scriptdeployments>

</usereventscript>

customscript_jj_ue_cpnvalidation_cocun9

<usereventscript scriptid=”customscript_jj_ue_cpnvalidation_cocun9″>

 <description></description>

 <isinactive>F</isinactive>

 <name>JJ UE CPN Validation COCUN 9</name>

 <notifyadmins>F</notifyadmins>

 <notifyemails></notifyemails>

 <notifyowner>T</notifyowner>

 <notifyuser>F</notifyuser>

 <scriptfile>[/SuiteScripts/Jobin and Jismi IT Services/COCUN 21 CPN/jj_ue_cpnvalidation_cocun9.js]</scriptfile>

 <scriptdeployments>

  <scriptdeployment scriptid=”customdeploy_jj_ue_cpnvalidation_cocun9″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>[scriptid=customrecord_customerpartnumber]</recordtype>

   <runasrole>ADMINISTRATOR</runasrole>

   <status>RELEASED</status>

  </scriptdeployment>

 </scriptdeployments>

</usereventscript>

<usereventscript scriptid=”customscript_jj_ue_cpnvalidation_cocun9″>

 <description></description>

 <isinactive>F</isinactive>

 <name>JJ UE CPN Validation COCUN 9</name>

 <notifyadmins>F</notifyadmins>

 <notifyemails></notifyemails>

 <notifyowner>T</notifyowner>

 <notifyuser>F</notifyuser>

 <scriptfile>[/SuiteScripts/Jobin and Jismi IT Services/COCUN 21 CPN/jj_ue_cpnvalidation_cocun9.js]</scriptfile>

 <scriptdeployments>

  <scriptdeployment scriptid=”customdeploy_jj_ue_cpnvalidation_cocun9″>

   <allemployees>T</allemployees>

   <alllocalizationcontexts>T</alllocalizationcontexts>

   <allpartners>F</allpartners>

   <allroles>T</allroles>

   <audslctrole></audslctrole>

   <eventtype></eventtype>

   <executioncontext>ACTION|ADVANCEDREVREC|BANKCONNECTIVITY|BANKSTATEMENTPARSER|BUNDLEINSTALLATION|CLIENT|CONSOLRATEADJUSTOR|CSVIMPORT|CUSTOMGLLINES|CUSTOMMASSUPDATE|DATASETBUILDER|DEBUGGER|EMAILCAPTURE|FICONNECTIVITY|FIPARSER|MAPREDUCE|OCRPLUGIN|OTHER|PAYMENTGATEWAY|PAYMENTPOSTBACK|PLATFORMEXTENSION|PORTLET|PROMOTIONS|RECORDACTION|RESTLET|RESTWEBSERVICES|SCHEDULED|SDFINSTALLATION|SHIPPINGPARTNERS|SUITELET|TAXCALCULATION|USEREVENT|USERINTERFACE|WEBSERVICES|WORKBOOKBUILDER|WORKFLOW</executioncontext>

   <isdeployed>T</isdeployed>

   <loglevel>DEBUG</loglevel>

   <recordtype>[scriptid=customrecord_customerpartnumber]</recordtype>

   <runasrole>ADMINISTRATOR</runasrole>

   <status>RELEASED</status>

  </scriptdeployment>

 </scriptdeployments>

</usereventscript>

custtab_617_11239844_564

<subtab scriptid=”custtab_617_11239844_564″>

 <parent></parent>

 <tabtype>ITEM</tabtype>

 <title>Customer Part Number</title>

</subtab>

Leave a comment

Your email address will not be published. Required fields are marked *