erictgrubaugh
12/18/2018, 7:37 PMMath.floor()
to avoid confusing situations just like this oneerictgrubaugh
12/18/2018, 7:38 PMVaid
12/18/2018, 7:45 PMshea
12/18/2018, 7:45 PMshea
12/18/2018, 7:46 PM|0
is slightly faster than Math.floor()
but it's dangerous (in javascript)Vaid
12/18/2018, 7:47 PMshea
12/18/2018, 7:48 PMcreece
12/18/2018, 7:49 PMerictgrubaugh
12/18/2018, 7:49 PMcreece
12/18/2018, 7:49 PMerictgrubaugh
12/18/2018, 7:50 PMrecord.load()
can take a second or two, saving some milliseconds isn't going to be appreciableKris Jones
12/18/2018, 7:55 PMKris Jones
12/18/2018, 7:55 PMsamantha
12/18/2018, 7:57 PM/**
* @NApiVersion 2.x
* @NScriptType ClientScript
* @NModuleScope Public
*/define(['./aes'],
function(aes) {
function pageInit(scriptContext) {
var encryptedAES = aes.CryptoJS.AES.encrypt("Message", "testpassword");
}
erictgrubaugh
12/18/2018, 8:14 PMCustom Module Examples
, there's a section Example: Add a non-AMD library
erictgrubaugh
12/18/2018, 8:15 PMaes.js
to figure out the name of its public exportalien4u
12/18/2018, 8:25 PMQuantity x 1.10
instead of:
(Quantity / 100) x Quantity
Nothing special is just fun to find more efficient ways...erictgrubaugh
12/18/2018, 8:32 PMEric B
12/18/2018, 8:32 PMalien4u
12/18/2018, 8:36 PMTyler
12/18/2018, 8:38 PMcreece
12/18/2018, 8:43 PMerictgrubaugh
12/18/2018, 8:45 PMcreece
12/18/2018, 8:46 PMcreece
12/18/2018, 8:46 PMerictgrubaugh
12/18/2018, 8:47 PMerictgrubaugh
12/18/2018, 8:47 PMif (context.type !-- CREATE) {
return;
}
// do something
erictgrubaugh
12/18/2018, 8:48 PMrustyshackles
12/18/2018, 8:52 PMcreece
12/18/2018, 8:52 PM