[Suitescript 2.x/Javascript] Client Script – Adjusting Items in Estimate/Suppress UI Exception?

Hello and thank you for your time today.

I’m attempting to change the item sublist in an Estimate record given user input to a custom process.  The issue I’m running into is that there may not be inventory to commit, resulting in an exception being thrown to the tune of “>>WARNING: not enough inventory” when I go to .save().

If we adjust the Estimate in the UI, the warning can be ignored and the item saved anyway.  In code, however, even if I catch the “>>WARNING” exception and continue through to the save, it’s found that the item has been left off the Estimate.

I’ve also tried the ignoreFieldChange parameter in setCurrentSublistValue, ignoreRecalc on commitLine, and switching to standard mode.  On Sales Orders I’d try to set the Commit to “Do Not Commit”, but this record seems to have no option in its fields.

I’ve found some mention to SuiteScript 1.0 nlapiSubmitRecord(soRec, {disabletriggers:true, enablesourcing:false, ignoremandatoryfields:true}) on StackOverflow, but the poster seemed to think this was a Bad Idea™, and I’d like to find a SuiteScript 2.0 solution  (see https://stackoverflow.com/questions/36094525/suppress-or-submit-record-if-ui-error-exists-netsuite-suitescript).

Does anyone have any experience with/idea of how to suppress the UI warning messages that are thrown on record modification?

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor