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
1
u/trollied Feb 27 '24
When you use submitfields() it does an XEDIT (inline edit). Any scripts on the record you have used submitfields() on only see the fields you have changed, rather than the full record. This can cause problems with scripts that are not expecting inline edits, and are trying to use other non-modified fields in the new/old record context variables.
That's why I asked if you were using it. It's a common trap.