cja
03/29/2021, 8:24 PMYour search contains a reference to join for which you do not have a permission: Entity
There isn't a permission called Entity. I have granted View permission for Contacts, Customers, Employees, Projects and Supplies but that didn't fix it. Any ideas?battk
03/29/2021, 9:49 PMcja
03/30/2021, 6:18 AMvar filters = [];
filters.push(search.createFilter({
name: 'custevent_sp_icefs_everenabled',
operator: <http://search.Operator.IS|search.Operator.IS>,
values: [true]
}));
if (!!prevLastModifiedDate){
filters.push(search.createFilter({
name: 'lastmodifieddate',
operator: search.Operator.GREATERTHAN,
values: [prevLastModifiedDate]
}));
}
const results = utils.doSearch('supportcase', filters, [
'internalid',
'casenumber',
'custevent_case_sched_start_date',
'custevent_case_sched_start_time',
'custevent_case_sched_end_date',
'custevent_case_sched_end_time',
'custevent1',
'title',
'startdate',
'custevent_sp_description',
'company.entityid',
'company.companyname',
'custevent_case_address',
'phone',
'custevent_sp_icefs_enabled',
'lastmodifieddate'
]);
cja
03/30/2021, 6:19 AMbattk
03/30/2021, 6:23 AMcja
03/30/2021, 6:26 AMbattk
03/30/2021, 6:33 AMbattk
03/30/2021, 6:33 AMbattk
03/30/2021, 6:33 AMcja
03/30/2021, 6:33 AMbattk
03/30/2021, 6:34 AMcja
03/30/2021, 6:34 AMbattk
03/30/2021, 6:34 AMbattk
03/30/2021, 6:35 AMbattk
03/30/2021, 6:35 AMcja
03/30/2021, 6:35 AMcja
03/30/2021, 6:47 AMbattk
03/30/2021, 6:55 AMbattk
03/30/2021, 6:56 AMbattk
03/30/2021, 6:56 AMrequire(["N/search"], function (search) {
log.debug(
"results",
search
.create({ type: "supportcase", columns: ["company.entityid"] })
.run()
.getRange(0, 1000)
);
});