Function to create a saved search for the Pending TimeSheet

function timesheetSearch(project_Search_Result) { try{ var filterArr = []; if(project_Search_Result.length>0){ for(var i=0;i<project_Search_Result.length;i++){ filterArr.push(project_Search_Result[i].prjId) } } var timesheetSearchObj = search.create({ type: “timesheet”, filters: [ [“custrecord_jj_supervisor_approval_status”,”anyof”,”1″], “AND”, [“totalhours”,”greaterthan”,”0.0″], “AND”, [“timesheetdate”,”onorafter”,”1/1/2020″], “AND”, [“timebill.customer”,”anyof”,filterArr] ], columns: [ search.createColumn({ name: “internalid”, summary: “GROUP”, label: “Internal ID” }), search.createColumn({ name: “employee”, summary: “GROUP”, label: “Employee” }), search.createColumn({ name: “custrecord_jj_supervisor_approval_status”, summary: “GROUP”, label:… Continue reading Function to create a saved search for the Pending TimeSheet