ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

[Feature] Navigating to previous and next Record


#1

Hi,
I am working on new small feature navigating to previous or next record(specific doctype) for which I have placed two arrow head near a group of a button. Any suggestion from you guys is welcome, please let me know your reviews.
com-video-to-gif

Regards,
Khushal!


Prev / Next Navigation: Need help
#2

Good one…!!!


#3

I could kiss you!

This is sooo needed!!!

Olamide


#4

Good thought…why not just have some standard keyboard shortcut for previous and next document


#5

Is the pagination tied to the list and filters in any way? How does it “know” what is next? Ideally this would be derived from the list in some manner. So if I apply a filter and then open a record, the next/previous buttons would be linked to the filtered list.


#6

Yes, that is the way it should work


#7

@James_Robertson
Thanks for your views, workiing on that


#8

That’s good suggestion.
We can use keyboard Left and Right arrows as shortcut for navigation.


#9

Please refer https://github.com/frappe/frappe/pull/4490
Please help to contribute this feature.

Thanks


#10

Did this progress further. It’s a great idea. Keyboard shortcuts would be great too.

How can i test this out? Is it just toolbar.js that is changed?


#11

form.js and toolbar.js in this PR, but I don’t think that all the logic is there; there should be a callback to the server to determine the next or previous document and the sort criteria. There are front end tests written, but it would be highly appropriate/ nearly required to write a new Cypress test for this.


#12

@khushal_t, are you trying to improve this feature? Why GitHub PR is closed? I want to contribute in this feature


#13

as mentioned on the PR

please send a complete PR and reopen / send a new PR
You can take help of someone in the community if you don’t know how to proceed.

I admit this comment is a bit foggy but I am guessing the code was not quite up the contribution guidelines yet.


#14

@vrms, the comment becomes less foggy if you also read the PR Description and Title, and look at the code changes. the PR was an incomplete one, there was only a UI added with no functionality.

I think @khushal_t was requesting some Help from the community regarding the PR. Hopefully, @dam_89 can collaborate and complete this feature. It would be a neat feature to have in ERPNext. :slight_smile:


#15

If you can do it in the tab list, inside the docs…


#16

yes it was just idea to put forth i did not make it complete PR, i shall be working on that


#17

ok thanks… I will try to do it… it seems very difficult because the feature is related with the list, filters, order, etc…


#18

This feature is now merged :tada:


#19

Hi, thanks for the feature…

I was testing it. When a list is ordered by “creation on” or “last modified on” it has a problem:

image


#20

Hi @dam_89!

I can’t reproduce this error, it works fine for me if the list is sorted by last modified on and created on. Is there any more information you can give me regarding this error? What is the error on the browser console?