Why data is coming in search result even not added criteria for that

I have created saved search in script to get employee and sequence number. I have added filter as,

[“sequence”,”anyof”,”100″,”63″,”104″,”65″,”101″,”61″]

And I am getting employees whose sequence is as above filter and also  50, 67,70, 85, 49

Why data is not filtering?

Please help!

 

filters:
[
[“custrecord_cpa_pay_paycode.custrecord_apd_pcm_sequence”,”anyof”,”100″,”63″,”104″,”65″,”101″,”61″]
],
columns:
[
search.createColumn({
name: “custrecord_apd_pcm_sequence”,
join: “CUSTRECORD_CPA_PAY_PAYCODE”,
summary: “GROUP”,
label: “Sequence”
}),
search.createColumn({
name: “custrecord_cpa_emp_in_annual”,
summary: “GROUP”,
sort: search.Sort.ASC,
label: “Employee”
}),
search.createColumn({
name: “custrecord_cpa_amount”,
summary: “GROUP”,
label: “Amount”
})
]
});

searchResultCount = customrecord_cpa_annual_salary_calculatiSearchObj.runPaged().count;
log.debug(“Total Employees”,searchResultCount);
resultObj = [];
var saveSearchResult = customrecord_cpa_annual_salary_calculatiSearchObj.run()
saveSearchResult.each(function (item) {
obj = {}
obj.sequence= item.getValue({name: “custrecord_apd_pcm_sequence”,
join: “CUSTRECORD_CPA_PAY_PAYCODE”,
summary: “GROUP”,
label: “Sequence”});
obj.amounts= item.getValue({name: “custrecord_cpa_amount”,
summary: “SUM”,
sort: search.Sort.ASC,
label: “Amount”});
resultObj.push(obj)
return true
})
// log.debug(“amount”,obj.amount);
return resultObj;
}

 

Beginner Asked on March 2, 2023 in SuiteScript.
Add Comment
1 Answer(s)

Hi,

What type of field is “custrecord_apd_pcm_sequence”?

Thanks,

Chris

Intermediate Answered on March 6, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor