RE: How to add saved search data to suitelet sublist?

I have created saved search on employee. I have to store each employees net pay, deductions,etc in sublist. In my script I m fetching result as,

[{“sublistpay”:”netpay”,”sublistEmployee”:”Rahul”,”subListAmount”:”17.71″},{“sublistpay”:”tax deduction”,”sublistEmployee”:”Varsha”,”subListAmount”:”110.00″}]

How to set employee wise values on suitelet sublist?


employee     netpay      tax deduction

Rahul                17.71

Varsha                                       110.00

Maira S Beginner Asked on March 2, 2023 in SuiteScript.
Add Comment
2 Answers

Thanks! It helped me lot 🙂

Another Issue I am facing is,

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


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!


name: “custrecord_apd_pcm_sequence”,
summary: “GROUP”,
label: “Sequence”
name: “custrecord_cpa_emp_in_annual”,
summary: “GROUP”,
sort: search.Sort.ASC,
label: “Employee”
name: “custrecord_cpa_amount”,
summary: “GROUP”,
label: “Amount”

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

Beginner Answered on March 2, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.