Skip to content

Latest commit

 

History

History
146 lines (121 loc) · 2.37 KB

entry-points.md

File metadata and controls

146 lines (121 loc) · 2.37 KB

suitescript/entry-points

Enforces the inclusion of at least one entry point based on the value provided in the @NScriptType tag. If no tag is provided, no entry point will be enforced.

Rule Details

✅ The following patterns are correct:

/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType UserEventScript
 */

define([], function () {
  return {
    beforeLoad: function () {},
  };
});
/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType ClientScript
 */

define([], function () {
  return {
    pageInit: function () {},
    somethingElse: function () {},
  };
});
/* eslint suitescript/entry-points: "error" */

// No @NScriptType tag

define([], function () {
  return {
    somethingElse: function () {},
  };
});

❌ The following patterns are incorrect:

/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType UserEventScript
 */

define([], function () {});
/* eslint suitescript/entry-points: "error" */

/**
 * @NScriptType ClientScript
 */

define([], function () {
  return {
    somethingElse: function () {},
  };
});

Script Types and Their Respective Entry Points

  • BundleInstallationScript
    • afterInstall
    • afterUpdate
    • beforeInstall
    • beforeUninstall
    • beforeUpdate
  • ClientScript
    • fieldChanged
    • lineInit
    • pageInit
    • postSourcing
    • saveRecord
    • sublistChanged
    • validateDelete
    • validateField
    • validateInsert
    • validateLine
    • localizationContextEnter
    • localizationContextExit
  • MapReduceScript
    • getInputData
    • map
    • reduce
    • summarize
  • MassUpdateScript
    • each
  • Portlet
    • render
  • Restlet
    • delete
    • get
    • post
    • put
  • ScheduledScript
    • execute
  • SDFInstallationScript
    • run
  • Suitelet
    • onRequest
  • UserEventScript
    • afterSubmit
    • beforeLoad
    • beforeSubmit
  • WorkflowActionScript
    • onAction
  • bankConnectivityPlugin
    • getRequiredConfigurationFields
    • downloadPreviousDayBankStatementFile
  • datasetbuilderplugin
    • createDataset
  • fiConnectivityPlugin
    • getConfigurationIFrameUrl
    • getAccounts
    • getTransactionData
  • fiParserPlugin
    • parseData
    • getStandardTransactionCodes
    • getExpenseCodes
    • getConfigurationPageUrl
  • workbookbuilderplugin
    • createWorkbook

Version

This rule was introduced in version 1.0.0.

Source