what am i doing wrong here - im getting a TYPE err...
# suitescript
l
what am i doing wrong here - im getting a TYPE error - its an after submit UE script
c
record.Type.ESTIMATE
Case sensitive
l
same error :"error.SuiteScriptError","name":"INVALID_TRANS_TYP","message":"Transaction type specified is incorrect.","stack":["createError(N/error)","afterSubmit(/SuiteScripts/Estimate Approval Required.js:17)"],"cause":{"type":"internal error","code":"INVALID_TRANS_TYP","details":"Transaction type specified is incorrect.","userEvent":"aftersubmit","stackTrace":["createError(N/error)","afterSubmit(/SuiteScripts/Estimate Approval Required.js:17)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}
c
Make sure you deploy the project. Sometimes if I only upload the script file NS will still use a cached version, especially for client scripts
l
it is deployed
c
I meant re-deploy it. Or you can just go into the script deployment, edit it, and save it
That may not be the issue, but just something to try
d
Log tran_id and check that it's a valid internal ID for an estimate.
b
the tranid is not an internal id
l
yes that was my mistake - i was using trand id instead of id - thank you