Marwan
12/31/2024, 3:38 PMlet filesCount = search
.create({
type: "vendor",
filters: [
["internalidnumber", "equalto", recID],
"AND",
["file.internalid", "noneof", "@NONE@"],
],
columns: [
search.createColumn({
name: "internalid",
join: "file",
}),
],
})
.runPaged().count;
if (filesCount == 0) {
throw "You must attach at least one file to the vendor record.";
}