Marty Zigman Marty Zigman
Prolecto Labs Accelerator Templates

Diagnose and Inspect NetSuite HTTPS Posts

NetSuite Technical

Tags: , , , , , ,

This article is relevant if you are developing software on the NetSuite SuiteScript platform.

Background

While preparing for Built for NetSuite Certification for our Bitcoin Transaction Coordinator product offering, the requirements demand that certain credential information be encrypted and referenced with NetSuite’s nlapiRequestURLWithCredentials API call.  The challenge with this API function is that it decrypts information and sends it on the internet via a secure SSL channel all in one call.  It’s quite difficult to debug the decryption element because you can’t see any work it performs before it sends it out over the wire.  See the article, “How to Use NetSuite’s nlapiRequestURLWithCredentials API’.

However, if you catch the HTTPS post information by being on the receving end of the post, you can diagnose your development work.  As such, I created a generic utility that can be valuable for both generic RestLet and Suitelet work.

NetSuite HTTPS Inspection and Diagnostics

The software represents a combination of components to help you diagnose https posts both inbound and outbound from NetSuite.

  1. Custom HTTPS Inspection Log Record: Each http post creates an entry in a custom table to make it easy to diagnose inbound requests.
  2. Suitelet: A External Suitelet is configured to all you to allow inbound anonymous requests.
  3. Credential Record and Tests:  To help learn how the nlapiRequestURLWithCredentials API call works, we supply a mechanism to outbound an https post to our utility to see all communications.  This utility will be the subject of a different article.

Custom HTTPS Inspection Log Record

Click the image to get a sample view of the information caught on the HTTPS post.  We break up the information as follows:

  1. Header Values
  2. Query Parameters
  3. Request Body
  4. Execution Context
With diagnostic information, you should be able to clearly see what is going in your posts.  This should be much easier to interpret versus traditional nlapiLogExecution debug statements.

External SuiteLet Endpoint

The SuiteLet is the endpoint that you will post to.  Since you can setup it up as anonymous (available without login), you don’t need to perform any authorization to get it to listen to your post work.  With some minor tweaks, the SuiteLet can be turned into a Restlet.  Click the screenshot for the suggested deployment.

Install the Bundle

The utility is available as a shared bundle (ID# 42919).  I am happy to share it with anyone who simply makes a request.  Just use our contact us form on our corporate site.

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

One thought on “Diagnose and Inspect NetSuite HTTPS Posts

Leave a Reply

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