Intermediate 15 min read

Record, Object, and List View Navigation

By the end of this lesson, you'll be able to:

  • Navigate to a specific record's view, edit, or clone page
  • Navigate to an object's home or new-record page
  • Navigate to a specific list view

Prerequisites: "NavigationMixin and Page References"

Navigating to a Record

this[NavigationMixin.Navigate]({
    type: 'standard__recordPage',
    attributes: {
        recordId: this.accountId,
        objectApiName: 'Account',
        actionName: 'view', // or 'edit', or 'clone'
    },
});

standard__recordPage navigates to a specific record. actionName determines whether it opens in view, edit, or clone mode.

Navigating to an Object Home or New Record Form

this[NavigationMixin.Navigate]({
    type: 'standard__objectPage',
    attributes: {
        objectApiName: 'Contact',
        actionName: 'home', // or 'new'
    },
});

standard__objectPage navigates to a whole object's page rather than one specific record — actionName: 'home' for the object's default list view landing page, or 'new' to open the new-record form directly.

Navigating to a List View

this[NavigationMixin.Navigate]({
    type: 'standard__objectPage',
    attributes: {
        objectApiName: 'Opportunity',
        actionName: 'list',
    },
    state: {
        filterName: 'Recently Viewed',
    },
});

Still standard__objectPage, but with actionName: 'list' and a state.filterName naming the specific list view to open.

Why This Matters in Real Projects

Custom components very often need to send the user somewhere else in the org after an action completes — opening the record that was just created, or taking them back to a relevant list view. Getting the right type/actionName combination is a common, very practical need.

Exercise

Write a PageReference that navigates to the edit page for a Contact record, given a recordId variable.

Show hint

Use standard__recordPage with actionName "edit".

JAVASCRIPT

Exercise

Challenge: write a PageReference that opens the new-record form for the Case object.

Show hint

Use standard__objectPage with actionName "new".

JAVASCRIPT

Record, Object, and List View Navigation Quiz

1. Which PageReference type navigates to one specific record?

2. What actionName value opens a record in edit mode?

3. What determines which specific list view opens when navigating with actionName "list"?

4. What PageReference type and actionName combination opens a new-record creation form for an object?

5. Does standard__objectPage require a recordId attribute?

Log in to submit the quiz and save your score.

My Notes

Log in to keep private notes on this lesson.

Questions about this lesson

No questions yet — be the first to ask.

Log in to ask a question about this lesson.

Summary

The type field on a PageReference selects a category of destination — records, whole objects, or specific list views each have their own attribute shape.