Issue in Pagination in Service portal widget

Nikita35
Kilo Guru

Hello 

I am working on a menu item - My Approvals which should give me Pending Approvals, Approval history.

In approval history widget, I am trying to show 5 approvals at a time(On clicking "next", next 5 approvals will show up ) - which included all the states except Requested.

I'm trying to fetch records from sysapproval_approver table. and paginate them.

The pagination works fine for gr.addQuery('state','Requested'); 

Now I'm trying to make a widget for Approval History gr.addQuery('state','!=','Requested'); 

but the pagination for this changes everytime I click next button, It shows 3, sometimes 2 or sometimes 5 records, it is not consistent pagination.

I tried fetching only for approved state, but same thing. It seems to work well only for requested records for me.

I've tried fetching less records also, till some date, as I thought the issues might be large data, but same issue.

Kindly help ASAP. 

Regards

 

11 REPLIES 11

Nikita35
Kilo Guru

Some help to debug the code would be appreciated.

Sanjay Bagri1
Tera Guru

Hi Nikita,

 

Please could you open the page approvals-approvals and edit it click on edit pencil 

find_real_file.png

Increase the Maximum limit of the page from 0 to 10 .

find_real_file.png

 

Then you will get the list of record on the one page based on the max number.

find_real_file.png

aand below is next button and previous button.

 

Please mark it correct and helpful so that this thread will close.

 

Thanks

Sanjay Bagri