Miquel Brazil
12/26/2019, 7:22 PMalert()
with validateField
the blur/focus events fire in a loop.MTNathan
12/26/2019, 7:30 PMMTNathan
12/26/2019, 7:31 PMMiquel Brazil
12/26/2019, 7:33 PMMTNathan
12/26/2019, 7:39 PMMiquel Brazil
12/26/2019, 7:44 PMMiquel Brazil
12/26/2019, 7:44 PMMiquel Brazil
12/26/2019, 7:46 PMonblur
event attached to the validating field. Then I “reset” the onblur
event attached to the input to an empty function, then I allow a quick timeout for the browser to attempt its on built in behavior and then I refocus the field leaving the original value and then reattach the original onblur eventMTNathan
12/26/2019, 7:47 PMMTNathan
12/26/2019, 7:48 PMfield
in that code, is that from context.currentRecord.getField()
?Miquel Brazil
12/26/2019, 7:48 PMMiquel Brazil
12/26/2019, 7:49 PMvar field = document.getElementById(id);
MTNathan
12/26/2019, 7:49 PMMiquel Brazil
12/26/2019, 7:49 PMMTNathan
12/26/2019, 7:49 PMMiquel Brazil
12/26/2019, 7:49 PMMiquel Brazil
12/26/2019, 7:50 PMdocument.getElementById(id).parentNode.style.display.toUpperCase() !== 'NONE'
Miquel Brazil
12/26/2019, 7:50 PMMiquel Brazil
12/26/2019, 7:51 PMnlobjField
methods seem to only give you the SuiteBuilder state of the fields you attempt to targetMTNathan
12/26/2019, 7:52 PMcontext.currentRecord
doesn't have a displayType
property, but nothing really surprises me anymore with NetSuite...Miquel Brazil
12/26/2019, 7:52 PMhidden
or visible
or display
properties of the field object when you use something like nlobjField.setDisplayType()
Miquel Brazil
12/26/2019, 7:52 PMMiquel Brazil
12/26/2019, 7:53 PMMTNathan
12/26/2019, 7:53 PMisVisible
property that's just a booleanMiquel Brazil
12/26/2019, 7:53 PMMTNathan
12/26/2019, 7:54 PMMiquel Brazil
12/26/2019, 7:54 PMMTNathan
12/26/2019, 7:54 PMMiquel Brazil
12/26/2019, 7:54 PMMiquel Brazil
12/26/2019, 7:55 PMMTNathan
12/26/2019, 7:55 PMMiquel Brazil
12/26/2019, 7:55 PMMiquel Brazil
12/26/2019, 7:56 PMvar LPCLV2 = (function () {
var _job = {
form: {},
shipping: {}
};
var _log = {};
return {
job: _job,
log: _log
}
})();
Miquel Brazil
12/26/2019, 7:56 PMMTNathan
12/26/2019, 7:56 PMMiquel Brazil
12/26/2019, 7:57 PMMTNathan
12/26/2019, 7:58 PMMiquel Brazil
12/26/2019, 7:58 PMMiquel Brazil
12/26/2019, 7:58 PMMiquel Brazil
12/26/2019, 7:58 PMMiquel Brazil
12/26/2019, 7:59 PMMiquel Brazil
12/26/2019, 8:00 PMFields
objectMiquel Brazil
12/26/2019, 8:00 PMfieldChange
Miquel Brazil
12/26/2019, 8:00 PMMTNathan
12/26/2019, 8:01 PMMTNathan
12/26/2019, 8:01 PMvalidateField
workaround, I'll have to give it a shot in some of our code, it seems like a much better option than just clearing the field outMiquel Brazil
12/26/2019, 8:01 PMMiquel Brazil
12/26/2019, 8:02 PM