I hereby claim:
- I am w3bguy on github.
- I am w3bguy (https://keybase.io/w3bguy) on keybase.
- I have a public key whose fingerprint is F479 2C98 E845 D1CE 2D3D F345 217D 187E EBD9 D29A
To claim this, I am signing this object:
/** | |
* CB_CM_CustomModule.js | |
* @NApiVersion 2.x | |
* @NModuleScope SameAccount | |
* | |
* @Author: Charles.Bastian | |
* @Created: 2020-03-12 | |
* @ScriptName: CB_CM_CustomModule | |
* @Filename: CB_CM_CustomModule.js | |
* @ScriptID: |
var newArray=oldArray.reduce(function(a,b){if(a.indexOf(b)<0)a.push(b);return a;},[]); |
/** | |
* @NApiVersion 2.0 | |
* @NScriptType Restlet | |
* @NModuleScope SameAccount | |
* @Author Charles.Bastian | |
* @Created 2019-03-13 | |
* @ScriptName NetSuite_RESTlet_Query_File_Contents_by_InternalID | |
* @Filename NetSuite_RESTlet_Query_File_Contents_by_InternalID.js | |
* @ScriptID customscript_rs_get_file_contents | |
* @Production |
<trans> | |
/* | |
convert input country names/abbreviations to the NetSuite country code | |
*/ | |
$netsuiteCountryDict = Dict(); | |
$netsuiteCountryDict["Afghanistan"]="_afghanistan"; | |
$netsuiteCountryDict["Albania"]="_albania"; | |
$netsuiteCountryDict["Algeria"]="_algeria"; | |
$netsuiteCountryDict["American Samoa"]="_americanSamoa"; |
<trans> | |
accoundAddressSFCountry=CASE( | |
accountAddressNSCountry=="_afghanistan","AF", | |
accountAddressNSCountry=="_alandIslands","AX", | |
accountAddressNSCountry=="_albania","AL", | |
accountAddressNSCountry=="_algeria","DZ", | |
accountAddressNSCountry=="_americanSamoa","AS", | |
accountAddressNSCountry=="_andorra","AD", | |
accountAddressNSCountry=="_angola","AO", | |
accountAddressNSCountry=="_anguilla","AI", |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
//Simple way to remove all non-numeric characters from a string, in JitterBit | |
$phone=RegExReplace($phone,"(\\D)",""); |
// function to figure out the number of days in month. | |
function getDaysInMonth(thisMonth,thisYear){ | |
var monthArray=[31,28,31,30,31,30,31,31,30,31,30,31]; | |
if(thisMonth!=2){return monthArray[thisMonth-1]}; | |
if(thisYear%4!=0){return monthArray[1]}; | |
if(thisYear%100==0 && thisYear%400!=0){return monthArray[1]}; | |
return monthArray[1]+1; | |
} | |
// NetSuite usage example |
// function to add leading zeros on date parts. | |
function zeroPad(num,len){ | |
var str=num.toString(); | |
while(str.length<len){str='0'+str;} | |
return str; | |
} | |
// function to format date object into NetSuite's mm/dd/yyyy HH:MM:SS format. | |
function formatNSDateTime(dateObj){ | |
if(dateObj){ |