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?
like,
employee netpay tax deduction
Rahul 17.71
Varsha 110.00
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,
[“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;
}