Not sure where I am going wrong here. I am trying...
# suitescript
a
Not sure where I am going wrong here. I am trying a simple submitFields in the script debugger
Copy code
record.submitFields({
            type: record.Type.ITEM_FULFILLMENT,
            id: '10214303',
            values: {
                memo: '1',
            },
            options: {
                enableSourcing: false,
                ignoreMandatoryFields: true
            }
        })
As simple as this. I am getting an error
*SSS_MISSING_REQD_ARGUMENT*1/14/2020 18:23:10.952 {"type":"error.SuiteScriptError","name":"SSS_MISSING_REQD_ARGUMENT","message":"search.lookupFields: Missing a required argument: id","stack":
r
Probably you are passing Id as string. Try it as integer
b
You havent shared all the code
In particular, something is trying to do search.lookupFields
If its not in the debugger, its probably from an user event script
n
When I am passing an internal ID, I am trying to do it like...
id: parseInt(internalId||0, 10)
e
as @battk indicated, you likely have a User Event running
beforeSubmit
that is attempting a
lookupFields
and failing
Likely it's doing the lookup through a List/Record field that isn't being changed, and thus isn't included in the UE's
newRecord
reference. The UE will probably need to be adjusted to ignore
XEDIT
events
👍 2
a
@erictgrubaugh @battk Thanks. You were correct. The cause was actually 2 user event scripts!