简体   繁体   中英

Get Custom List Inactive field in SuiteScript search

Can someone tell me if the Inactive field on a Custom List record can be used as Search Column in search.createColumn();

something like this:

search.createColumn({
        name: 'isinactive',
        join: 'custrecord_custlist_field'
});

I don't know of a way to use a join to the custom list, but you may be able to get the list through a search and get the inactive field value like this...

var customlist_yourlistidSearchObj = search.create({

type: "customlist_yourlistid",

filters:

[

],

columns:

[

  search.createColumn({

     name: "name",
     sort: search.Sort.ASC

  }),
  search.createColumn({name: "scriptid"}),
  search.createColumn({name: "isinactive"})

] });

var searchResultCount = customlist_yourlistidSearchObj.runPaged().count;

log.debug("customlist_yourlistidSearchObj result count",searchResultCount);

customlist_yourlistidSearchObjSearchObj.run().each(function(result){

// .run().each has a limit of 4,000 results

return true; });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM