Who Is this Document For?
This document is intent for experienced NetSuite Developers.
You must be running in Pacejet's Bundle for NetSuite SuiteScripts 2.0.
About the Pacejet Custom Plugin
Pacejet enables you to apply custom code inside of NetSuite 20.x to perform many different customized tasks, such as those listed below:
Custom Build Import Processes
Custom Methods for Revealing Buttons (like Ship and Quote)
Custom Shipping Tasks
Custom Shipping Methods
Custom Shipping Cost Updates
Use Case
The Problem
Kallihan Sprockets wants to hide the Ship button because they have subsidiaries that they don't want to have shipping integration.
The Solution
Pacejet's Custom Plugin enables NetSuite developers to write custom code for many different needs and situations. See an example of this code below for one of many possible ways to edit the Custom Plugin Script.
Using The Pacejet Custom Plugin Script
Where To Find the Code
The Custom Plugin Code is Part of the Pacejet Shipping for NetSuite Bundle 20.x and can be downloaded for editing by using the following directions:
Select Customization, Plugins, Custom Plugin Types.
Set all the filters to blank.
Look for the bundle Pacejet Plugin Implementation.
Click the link under Script
Download the script with the Download button:
You can also edit the script directly in the app by clicking Edit toward the middle of the page.
Editing The Script
Do Not Delete Any Code
When making customizations to the Custom Plugin script, do not delete any of the code you haven't touched. Doing so will cause errors in the system. Instead, just add the desired code into the appropriate section of the file.
This Plugin works on all transaction types. If you want to limit the custom plugin to a specific transaction type, you need to add the appropriate code to check for the transaction type you wish to impact.
Implementing the New Script
Click Customization, Plugins, Plug-in Implementations
Click New Plug-in Implementation.
Mouse-over the Script File field and click the Plus sign to upload the desired file.
Select Choose File.
Select the desired file and click Save.
Click Create Plugin Implementation:
.
Select Pacejet Plugin Implementation from the list.
The Plugin Implementation Screen appears.
Fill out the Name, and ID.
Set the Status to Testing if you need to test your script. Set to Released when you're ready to run.
Set Log Level to Debug.
Click Save when you are finished. The script is now active for all current and future transactions.
IMPORTANT! Change the status back from Testing to Released so that plugin is active.
Finding the Activity of Your Custom Plug In
You can find the activity of your custom plug in logged in a few different locations:
For Button hiding plugin functions and the runBeforeLoad, runBeforeSubmit, and runAfterSubmit:
Customization > Scripting > Script > Pacejet Integration > Execution LogFor the FullUpdate, ShipMethodUpdate, ShipCostUpdate, ShipStatusUpdate, VoidUpdate:
Customization > Scripting > Script > Pacejet Integration Web Hook as well as Pacejet Integration Queue Map Reduce > Execution LogThe PackageDetailsImport & BuildImport:
Customization > Scripting > Script > Pacejet Integration Suitelet & Pacejet Integration Queue Map Reduce > Execution Log