I am struggling with a search, I am running the se...
# suitescript
d
I am struggling with a search, I am running the search in console and in script. I am running the search in console and script with the same data in the filters (From what I can tell). In console it will produce a result and in script it will not.
Copy code
var customrecord_scm_item_substituteSearchObj = search.create({
       type: "customrecord_scm_item_substitute",
       filters:[["custrecord_scm_itemsub_substitute","anyof","544095"]],
       columns:["custrecord_scm_itemsub_parent"]
    });

    log.debug({title: "Subs found: ", details: customrecord_scm_item_substituteSearchObj.runPaged().count})
    customrecord_scm_item_substituteSearchObj.run().each(function(result){
      all_subs.push(result.getValue("custrecord_scm_itemsub_parent"));
      return true;
    });
message has been deleted
message has been deleted
p
and you’ve checked the permissions on the deployment vs the permissions on the custom record?
d
Script is a user event running as Administrator
I am running in Console as Administrator