The search will show the periods which are closed for a specific subsidiary for A/R or A/P or ALL types.
- Go to Setup -> Accounting -> Manage Accounting periods.
- Click the check List

- In the Period Close Checklist page, click the arrow for any period type.

- The task for that type will be opened
- At the top right corner, there is a search icon.

- Click the icon and open the saved search page.
- In there, create the saved search for the Task Item Status. You can specify the subsidiary in order to filter the closing of periods based on subsidiary for A/R or A/P
The below is a search as code to fetch the A/R period status for a specific subsidiary.
var taskitemstatusSearchObj = search.create({
type: "taskitemstatus",
filters:
[
["itemtype","anyof","PCP_LOCK_AR"],
"AND",
["subsidiary","anyof","91"]
],
columns:
[
search.createColumn({name: "period", label: "Period"}),
search.createColumn({name: "complete", label: "Complete"})
]
});
var searchResultCount = taskitemstatusSearchObj.runPaged().count;
log.debug("taskitemstatusSearchObj result count",searchResultCount);
taskitemstatusSearchObj.run().each(function(result){
// .run().each has a limit of 4,000 results
return true;
});
/*
taskitemstatusSearchObj.id="customsearch1745587308145";
taskitemstatusSearchObj.title="Task Item Status Search AQB 4321 (copy)";
var newSearchId = taskitemstatusSearchObj.save();
*/