function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Philip BonthaPhilip Bontha 

Hi Experts, I need navigation button between two datatables in lightning.If i click the button it should have navigate to previous datatable.

There are two objects parent and child.The parent data is displying in one datatable along with checkboxes to select the records,If i selected one parent record and click the serach button it navigate the child records datatable.There I want to create one Back button to navigate previous parent datatable.

Thanks in advance..!

ANUTEJANUTEJ (Salesforce Developers) 
Hi Philip,

I found the below example where it shows a way to navigate without refreshing the browser, below is the link to that implementation: 


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

AnudeepAnudeep (Salesforce Developers) 
In general navigation requires a pagereference/hyperlink 

Here is an example
var navService = cmp.find("navService");

// Sets the route to /lightning/o/Account/home
var pageReference = {
    type: 'standard__objectPage',
    attributes: {
        objectApiName: 'Account',
        actionName: 'home'
cmp.set("v.pageReference", pageReference);

The same can be done in datatable as well

Here are some examples that you can look at

Let me know if this helps, if it does, please close the query by marking it as solved. It may help others in the community. Thank You!