How to encode a text to Base 64

NetSuite provides a standard encode module that can be used to encode a value or text to base 64. Example: Creation of basic authentication string in API call // Replace these with your actual username and password var username = ‘your_username’; var password = ‘your_password’; // Create the basic auth string var authString = username… Continue reading How to encode a text to Base 64

How to Decode a Base64 String in NetSuite

How to Decode a Base64 String in NetSuite Introduction Base64 encoding is commonly used to encode binary data as text, which can be easily transmitted over text-based protocols such as HTTP. In NetSuite, decoding a Base64 string can be essential for various integrations and data handling tasks. This article will guide you through the process… Continue reading How to Decode a Base64 String in NetSuite

QR Code compatible with Zakat Tax and Customs Authority

While using the below code for the QR code. The only problem is that there is a message saying it is not compatible with Zakat Tax and Customs Authority. Solution: We need to encode the data as per the Zakat Tax and Customs Authority documentation. Below is the code for encoding data as per the… Continue reading QR Code compatible with Zakat Tax and Customs Authority

Convert Base 64 encoded image data to a JPEG and encoded PDF file in to the File cabinet.

NetSuite does convert Base64 image data to a JPEG file in the file cabinet automatically. I have tried different methods to decode the base 64 encoded image data. Failed to save the image data to a folder created in file cabinet. solution: Use N/encode module, in file.create() use “file.Encoding.BASE_64” for encoding type. Instead of trying… Continue reading Convert Base 64 encoded image data to a JPEG and encoded PDF file in to the File cabinet.