This topic contains 1 reply, has 0 voices, and was last updated by JacksonP 7 years, 9 months ago.

  • Author
    Posts
  • #1188

    mayerlench

    The bin worksheet record is created in dynamic mode and even then its allowing me to set inventory detail and commit lines. Cant figure out why its failing on save.

    Attached is latest script and error

    {

    “type”: “error.SuiteScriptError”,

    “name”: “UNEXPECTED_ERROR”,

    “message”: null,

    “stack”: [

    “anonymous(N/recordService)”,

    “execute(/SuiteScripts/bin_putaway.js:104)”

    ],

    “cause”: {

    “type”: “internal error”,

    “code”: “UNEXPECTED_ERROR”,

    “details”: null,

    “userEvent”: null,

    “stackTrace”: [

    “anonymous(N/recordService)”,

    “execute(/SuiteScripts/bin_putaway.js:104)”

    ],

    “notifyOff”: false

    },

    “id”: “”,

    “notifyOff”: false

    }

    Attached Files

    bin_putaway.txt

    (2.3 KB, 1 view)
    This is a cached copy. Click here to see the original post.

  • #1189

    JacksonP

    I didn’t have much time to look at this, but there are a couple syntax errors in your script. Extra commas and these two lines aren’t in 2.0. I’m not sure if you can get/set values without it being structured in 2.0 syntax,

    binWS.setText(‘location’, ‘AMZ’)

    var lineCount = binWS.getLineCount(‘item’)


    mayerlench replied on 02/13/2017, 12:21 PM: The extra commas dont actually break the code.

    The setText is definitely 2.0 valid syntax. You dont need to pass in objects to set fields in 2.0.

    Iv ran this in the debugger and im getting correct data

You must be logged in to reply to this topic.