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 DFB0 0181 BFFE 2D61 8F56 F5B1 CC98 37AC B550 E038
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<trans> | |
$isInQueue=GetOperationQueue("<TAG>Operations/OperationToCheck01</TAG>"); | |
$isInQueue2=GetOperationQueue("<TAG>Operations/OperationToCheck02</TAG>"); | |
$isRunning=$isInQueue[0][1]; | |
$isRunning2=$isInQueue2[0][1]; | |
if(($isRunning==1 && $isRunning!=Null()) || ($isRunning2==1 && $isRunning2!=Null()), | |
WriteToOperationLog("Skip for now: "+$isRunning+" / "+$isRunning2);, | |
WriteToOperationLog("Nothign is Running - Starting Operation Chain."); | |
RunOperation("<TAG>Operations/OperationToCheck01</TAG>"); | |
); |
// 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){ |
<trans> | |
thisState=case( | |
thisState=='Alabama','AL', | |
thisState=='Alaska','AK', | |
thisState=='Arizona','AZ', | |
thisState=='Arkansas','AR', | |
thisState=='California','CA', | |
thisState=='Colorado','CO', | |
thisState=='Connecticut','CT', | |
thisState=='Delaware','DE', |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<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", |
<trans> | |
$contact_country=CASE( | |
$contact_countryShort=="AF","_afghanistan", | |
$contact_countryShort=="AX","_alandIslands", | |
$contact_countryShort=="AL","_albania", | |
$contact_countryShort=="DZ","_algeria", | |
$contact_countryShort=="AS","_americanSamoa", | |
$contact_countryShort=="AD","_andorra", | |
$contact_countryShort=="AO","_angola", | |
$contact_countryShort=="AI","_anguilla", |
<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"; |