Pacejet

NETSUITE INTEGRATION: Using the Pacejet Custom Plugin

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.

CustomPlugin.png


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:

  1. Select Customization, Plugins, Custom Plugin Types.
    CustomPluginMenu.png

  2. Set all the filters to blank.
    filters.png

  3. Look for the bundle Pacejet Plugin Implementation.
    Click_Link_Under_Script.png

  4. Click the link under Script

  5. Download the script with the Download button: mceclip0.png

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

  1. Click Customization, Plugins, Plug-in Implementations
    CustomPluginMenuImp.png

  2. Click New Plug-in Implementation.
    NewPI_Imp_Button.png

  3. Mouse-over the Script File field and click the Plus sign to upload the desired file.
    PlusSign.png

  4. Select Choose File.
    ChooseFile.png

  5. Select the desired file and click Save.

  6. Click Create Plugin Implementation: CreatePlugInImp.png.

  7. Select Pacejet Plugin Implementation from the list.
    SelectPJ_PI_Imp.png

    The Plugin Implementation Screen appears.

    FieldsToUse.png

  8. Fill out the Name, and ID.

  9. Set the Status to Testing if you need to test your script. Set to Released when you're ready to run.

  10. Set Log Level to Debug.

  11. 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.

RELEASED.png


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 Log

  • For the FullUpdate, ShipMethodUpdate, ShipCostUpdate, ShipStatusUpdate, VoidUpdate:
    Customization > Scripting > Script > Pacejet Integration Web Hook as well as Pacejet Integration Queue Map Reduce > Execution Log

  • The PackageDetailsImport & BuildImport:
    Customization > Scripting > Script > Pacejet Integration Suitelet & Pacejet Integration Queue Map Reduce > Execution Log