fiogf49gjkf0d Indeed there are many ways to count the number of Activities, and the method to use depends on what you are trying to Count.
One Method mentioned is to write your own SQL query to figure out the Count (based on your Criteria).
Also, if you want to get a Count based on the Contents of the Panel, there are Methods on the Panel object that return the Data, or there are ways to get directly to the Panels Reader and query the data directly:
e.g.
<strong> var panel = Sage.SalesLogix.Controls.ListPanel.find("MainList"); if (panel) { selectionInfo = panel.getSelectionInfo(); }
Or
<p> var recordCount = this.views.list.store.reader.jsonData.count;
(You may need to explore the Objects via a Debugger to determine the name of the List you are interested in).
By using this approach, you don't have to try to figure out the Selected Criteria and build a matching SQL statement, as you would be getting the count (or the data) based on the Criterias already set on the Screen (including filters).
|