Tyler
05/18/2023, 12:06 PMBenjamin Jung
05/18/2023, 1:44 PMTyler
05/18/2023, 2:18 PMHelena
05/18/2023, 2:28 PMfunction getListScriptId (list, text) {
let listScriptId = null;
search.create({
type: list,
columns: [
'name',
'scriptid'
]
}).run().each(function(result) {
// Note: From tests, the script ID from the search results are always uppercase.
if (result.getValue("name") === text) {
listScriptId = result.getValue('scriptid');
}
// Stop iterating when we find the target ID.
return (listScriptId === null);
});
return listScriptId;
}NickSuite
05/18/2023, 3:08 PMNickSuite
05/18/2023, 3:09 PM