Hello,
Did anyone ever figure out a way to navigate from 1 child record to another right from the Detail page of that child?
Example I have an account with multiple contacts
I would like to find a way that when i open the detail page of a contact, to be able to navigate to previous and next related contact(s), using something like a “wizard” step or similar
The sort order would be created date
Thank you
Create a model for each direction where the condition is less than or greater than on the created date with the field CreatedDate used to sort and return one record adjacent to the current record based on CreatedDate. Set both to load on page load.
Then redirect to these records using Redirect Action on {{$Model.PreviousRecord.data.0.Id}} & {{$Model.NextRecord.data.0.Id}}
Pat you are truly a champion
Thank you very much, it worked perfectly!
The date makes sense. Any ideas on if the next record needs to the next record in alphabetical order?
Hmmm … not sure about this one.
How many records in the model if you brought them all in? You could potentially do something similar where you have simply the Id in this AllRows model where it’s sorted alphabetically. Then you could run a snippet to find the current Id in this model in order to look up the next row’s Id and update the CurrentModel.
A typical user will see 200 or less records. I tried doing it the same as the date method. The next button appears to work perfectly using that method. The last button goes back to the first client in the row.
Any chance you can help me out with the snippet. I am hindered by my lack of coding skills.
Sure. Invited you on Google Hangouts.
Thanks Pat! We did it without a snippet. It is awesome. Greater and Less than work with Alphabetical lists too. And then we just conditionally Enabled the buttons so that if there is no data rows you can’t click on the button but it still appears. I will show the details in case someone else is working on a similar problem.
Your welcome.
Hi Pat - can you clarify how you “return one record adjacent to the current record based on CreatedDate”?
I have the models and conditions set up, but need to activate this next step.
Thanks!
The NextRecord and PreviousRecord Model are used in Redirect actions.
/{{$Model.NextRecord.data.0.Id}}
/{{$Model.PreviousRecord.data.0.Id}}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.