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_PowerShell.ps
Created November 25, 2020 14:10
Call a Powershell command from within Jitterbit
// Author - Danial Fields
$command = "cmd";
$arguments = '/c powershell -ExecutionPolicy ByPass -File "C:\\directory\\RunCommand Test.ps1" -p1 ' + $p1 + ' -p2 ' + $p2 + ' -p3 '+ $p3 + '"';
@W3BGUY
W3BGUY / Jitterbit_PostgreSQL_Update
Last active August 19, 2022 14:49
Updates to improve PostgreSQL performance.
Add to Jitterbit.conf file
[LogSync]
# Max number of records at once to sync - This is the initial batch size only! After retries it goes
#back to MinRecordsToSync!
MaxRecordsToSync=500
#Max sleep between retries
MaxRetryDelaySec=60
#It's actually the maximum after retries have kicked in!
MinRecordsToSync=500
@W3BGUY
W3BGUY / Jitterbit PostgreSQL Info.sh
Last active March 31, 2021 21:15
Jitterbit PostgreSQL Info
# Connect to PostgreSQL from Linux
/opt/jitterbit/pgsql/bin/psql -d postgres -U jitterbit -p 46914
# List databases
\l
# list tables
\dt
# Connect to TranDb database
@W3BGUY
W3BGUY / NetSuite_GetItemType.js
Created June 7, 2021 11:41
Simply function to get any item type by internal ID. Adding this since I've seen multiple questions about how to do it.
function getItemType(itemID){
var itemData={};
try{
itemData=search.lookupFields({type:search.Type.ITEM,id:itemID,columns:['type','externalid','price','displayname']});
log.debug('itemData',JSON.stringify(itemData));
}catch(err01){
log.error('getItemType('+itemID+').err01',JSON.stringify(err01));
}finally{
return itemData;
}
@W3BGUY
W3BGUY / NetSuite_TBA_OAuth.php
Last active February 17, 2024 06:47
Basic PHP NetSuite OAuth1.0 (SHA256) authentication to call RESTlet script.
<?php
/**
* @Author w3bguy
* @Created 2021-09-08
*
* Description:
* Basic PHP NetSuite OAuth1.0 (SHA256) authentication to call RESTlet script.
*
* @modifications
* Date Author Version Remarks
@W3BGUY
W3BGUY / country_ISO3166-1_to_NetSuite.txt
Last active November 10, 2021 16:54
#Jitterbit #Country Codes Conversion - #ISO3166-1 Alpha-2 format to #NetSuite format
$countryCodeDict=Dict();
AddToDict('countryCodeDict','AF','_afghanistan');
AddToDict('countryCodeDict','AX','_alandIslands');
AddToDict('countryCodeDict','AL','_albania');
AddToDict('countryCodeDict','DZ','_algeria');
AddToDict('countryCodeDict','AS','_americanSamoa');
AddToDict('countryCodeDict','AD','_andorra');
AddToDict('countryCodeDict','AO','_angola');
AddToDict('countryCodeDict','AI','_anguilla');
AddToDict('countryCodeDict','AQ','_antarctica');
@W3BGUY
W3BGUY / 00-Jitterbit_NetSuite_RESTlet_API_GET
Last active January 25, 2023 16:05
Jitterbit Scripts to Call NetSuite RESTlet via GET
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_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).
@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_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).