In the following code what is passed to type key?

    var pageRef = {
        type: 'custom__recordPage', // What is type here?
        attributes: {
            actionName: 'view',
            objectApiName: 'Inventory__c',
            recordId : resp

1 Answer 1


It's the value for the page reference type. E.g., if you are navigating to a record page type, then your type value will be standard__recordPage.

A pageReference must be defined with a specific type. The type generates a unique URL format and provides attributes that apply to all pages of that type.

Below are the supported page types as listed in the documentation along with their type values.

  • Lightning Component (type: standard__component)
  • Knowledge Article (type: standard__knowledgeArticlePage)
  • Named Page (type: standard__namedPage)
  • Navigation Item Page (type: standard__navItemPage)
  • Object Page (type: standard__objectPage)
  • Record Page (type: standard__recordPage)
  • Record Relationship Page (type: standard__recordRelationshipPage)
  • Thank you for your answer! How can I know my page reference type?
    – Akki Gupta
    Nov 13, 2018 at 19:44
  • It depends on to which page reference type you are navigating to. The documentation lists down all type values.
    – Jayant Das
    Nov 13, 2018 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.