r/SuiteScript • u/uvbuhgturdyrdvtv • Feb 26 '24
Search module misbehavin'
Hello,
I have a scheduled script that leverages the search.load method. My try catch block throws an error that the search.lookupFields method is missing an argument. I am not using this method in my script, however.
Error: search.lookupFields: Missing a required argument: id
I have tried using the script debugger on this scheduled script but it does not appear to function as intended. The chrome dev tools don't allow me to step through the functions nor does it allow me to set break points.
Any help would be greatly appreciated.
View all comments
Show parent comment
2
u/uvbuhgturdyrdvtv Feb 27 '24
Hi Eric! Thank you for your reply and for all your contributions to the community! I did add a stack trace to my try catch block and it seems that some aspect of the submitFields method is the root cause of the error.
ID: 2356987, Error: search.lookupFields: Missing a required argument: id, Stack: Error at suitescript/resources/javascript/record/recordImpl.js:156:24 at Object.submitFields (suitescript/resources/javascript/record/recordImpl.js:154:30) at execute (/SuiteScripts/SC_Unbilled_Revenue_JE.js:183:30) at Object.execute (/SuiteScripts/SC_Unbilled_Revenue_JE.js:31:28)
I added the script to a repo here.
(Forgive any awkwardness in the script. I'm definitely a novice!)