Skip to content

Instantly share code, notes, and snippets.

View W3BGUY's full-sized avatar
🤐
Burnt Out

w3bguy W3BGUY

🤐
Burnt Out
View GitHub Profile
@W3BGUY
W3BGUY / JitterBit-Validate_Email
Last active February 14, 2023 20:32
Validate email format using RegExMatch
<trans>
email='testemail@test.co';
regTest='([A-z0-9._%+-]+@[A-z0-9.-]+\\.[A-z]{2,4})';
if(RegExMatch(email,regTest)>0,
email;,
Unmap();
);
</trans>
@W3BGUY
W3BGUY / JitterBit-Validate_URL
Last active February 20, 2023 12:07
Validate a URL format using RegExMatch()
<trans>
url='www.test.net';
url='http://www.test.com lkjasdhfkhasdf';
if(Left(ToLower(url),4)!='http' && Left(ToLower(url),5)!='https',
url='https://'+url;
);
regTest='^((http|https):\/\/)?(www.)?(?!.*(http|https|www.))[a-zA-Z0-9_-]+(\.[a-zA-Z]+)+((\/)[\w#]+)*(\/\w+\?[a-zA-Z0-9_]+=\w+(&[a-zA-Z0-9_]+=\w+)*)?\/?$';
if(RegExMatch(url,regTest)!=-1,
url;,
@W3BGUY
W3BGUY / NetSuite_SOAP_Customer_Upsert-Postman.txt
Last active February 8, 2023 11:39
Postman setup for NetSuite SOAP customer upsert
Method: POST
URL: https://123456-sb1.suitetalk.api.netsuite.com/services/NetSuitePort_2022_2
Add headers:
Content-Type: text/xml
SOAPAction: upsert
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_DELETE
Last active January 25, 2023 16:26
Jitterbit Script to Call NetSuite REST API to Delete Records
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_PUT
Last active January 25, 2023 16:20
Jitterbit Script to Call NetSuite REST API to Upsert Records
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_PATCH
Last active January 25, 2023 16:09
Jitterbit Script to Call NetSuite REST API to Update Records
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_POST
Last active January 25, 2023 15:30
Jitterbit Script to Call NetSuite REST API to Create Records
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_Query_SuiteQL
Last active January 25, 2023 15:33
Jitterbit Script to Call NetSuite REST API using SuiteQL Queries
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).
@W3BGUY
W3BGUY / TCI_RS_Create_Invoice_PDF.js
Last active September 23, 2022 18:29
NetSuite RESTlet Script to accept an invoice internal ID, render the invoice into a PDF, and return a payload that includes the invoice PDF contents.
/**
* @NApiVersion 2.1
* @NScriptType Restlet
* @NModuleScope SameAccount
* @Author Charles.Bastian (Technocrat Consulting Inc)
* @Created 2022-00-00
* @ScriptName TCI_RS_Create_Invoice_PDF
* @Filename TCI_RS_Create_Invoice_PDF.js
* @ScriptID customscript_tci_rs_create_invoice_pdf
* @SandBox
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_REST_API_GET
Last active January 25, 2023 16:08
Jitterbit Script to Call the GET NetSuite REST API - use with (NS_Encode_oAuth_Params_and_Signature.js)
01> Create transformation operation with script 01 as the first step.
02> Create script operation with step 02 as teh script (called by script 01 script).
03> Create JavaScript with contents from step 03 (called by Step 02 script).