Tuesday, August 16, 2016

Solving Change Set Error: Is Not a Valid Override for Action View

Recently, I was promoting changes from a Sandbox org to a Production environment.  While my change set had a lot of items, they were all rather basic - custom objects, custom fields, tabs, page layouts and list views.

When validating my changes in the Production org, I encountered a rather unexpected error - Building_Record_Page does not exist or is not a valid override for action View.  In my case, Building was the name of one of my custom objects.

While I thought this was a straight forward item to resolve, my initial hypothesis on the source of the error was incorrect.  Here's my journey to find the root cause and resolve the issue.

Buttons, Links and Actions

Upon seeing 'override for action View' in the error message, my thoughts immediately went to the Buttons, Links and Actions section of the custom object.  There must be a Visualforce page override on the View action that I forgot to include.  Although, this did not seem quite right, as I had not created any Visualforce as part of the solution.  Nonetheless, I headed to the custom object details (Building in my case) in the sandbox.  What I found was what I expected, the boring set of normal buttons with no overrides.


As this was not source of my issue, I went to more unlikely, possible causes.

Embedded Wave Dashboards

Part of my overall solution in the sandbox included embedded Wave dashboard as part of the object's page layout.  I was not deploying the Wave assets as part of this release, only the underlying objects. Perhaps the presence of the wave dashboard on the layout which did not exist in production caused the error.  

I updated my page layout, cloned the change set, uploaded, validated, and.....received the same error.


Detective Time

At this point, I am rather stumped.  However, this sandbox was a shared org where other admins had access.  Time to head over to the Setup Audit Trail to see what changes had been made.  

I downloaded the last six months into Excel and started going through the details.  My changes were there, as well as push upgrades to managed packages.

Then an interesting line item appeared.  Another admin had enabled the Lightning Experience and created a Lighting Page.  Even more interesting is the entry for 'Added standard button override on <Object>: view (Lightning Page null)'. 

Here is what the audit log looks like from an org where I recreated the issue.


I quickly switched over to the Lightning Experience, navigated to Setup Home and searched for Lighting App Builder.  There was the likely Lighting Page causing my issue.  Now, to correct the error.


Resolution

While it would be easy to delete the record, I did not want to mess up the work the other admin had performed.  My next stop was on one of the custom object records.  I navigated to the Empire State Building's record.  I used Edit Page from the Setup icon to go to the Lighting Page Builder.

The next step was to use the Activation button in the upper right hand corner.  This brings up the Activation for <Object> Record Page.  From this page, you can select the active record home page that is shown to all users in the Lightning Experience when they view this object's record.  

In my case, an existing Building RecordPage was marked as Active.  I removed the Active check next to my page.  This resets the new page back to [System Default Page].  It also removes the view override on the customer object.  

Here is the before details on active page.


Here is the after details on active page once Active is unchecked.


After saving my change, I cloned the change set, uploaded it to production, validated the contents and was good to go.  

With Lightning Pages now in the mix, keep these assignments in mind when uploading change sets.  Happy coding.

38 comments:

  1. Thank you! I just had the exact same issue. Your article saved me hours of digging. Thanks!

    ReplyDelete
  2. Thanks for sharing this! Never would have figured this out.

    ReplyDelete
  3. @ Carl, This was one of the last few errors I had to resolve in the marathon 5 days deployment effort. After 5 days of hard work, I would have definitely taken more and more time to identify and fix the very same problem.

    Thank You for being a beacon for me. Appreciate your effort in posting the crucial information.

    Cheers!!!
    Ashok

    ReplyDelete
  4. Very helpful. Cheers.

    ReplyDelete
  5. This post was helpful. Thank you!

    ReplyDelete
  6. Thanks! You saved my ass :)

    ReplyDelete
  7. This is very helpful. Thank you.

    ReplyDelete
  8. wow. i have no idea how i would solve this problem. thanks a TON!

    ReplyDelete
  9. This is really helpful !! Thank you :)

    ReplyDelete
  10. This was a fantastic post, I had the same issue and this solved my problem. Thank You!

    ReplyDelete
  11. Your article saved us in our deployment, we literally were scratching our head as to what on earth was wrong with our deployment change set... and we spent hours trying to figure out what's wrong.

    ReplyDelete
  12. thanks for sharing this procedure.

    ReplyDelete
  13. Nice one. the last error in the deployment......you saved me

    ReplyDelete
  14. You have saved me SO MUCH TIME! Thank you!!!

    ReplyDelete
  15. THANK YOU SO MUCH !!! Even after four years - I ran into this and was so confused.

    ReplyDelete
  16. Thanks, Carl. This sure saved me a lot of time.

    ReplyDelete
  17. THANK YOU, Carl. Saved me hours and much lost hair!

    ReplyDelete
  18. THANK YOU! Much appreciated.

    ReplyDelete
  19. Whow, I am glad I found this! I am not sure if I would have found the problem without this post ! Thank you!

    ReplyDelete
  20. Thank you, but this shouldn't have been necessary in the first place. It means Salesforce has a flaw in their lightning page deployments and completely inadequate error messages to work around those flaws.

    ReplyDelete
  21. Thanks so much! Very helpful as I was running into the same issues.

    ReplyDelete
  22. How am I not surprised to see Carl solved this pesky one :) Thanks again.

    ReplyDelete
  23. How am I not surprised to see Carl solved this pesky one :) Thanks as always!

    ReplyDelete
  24. This saved my bacon today! Thanks Carl

    ReplyDelete
  25. Thank you, this was my issue as well!

    ReplyDelete
  26. It's kind of crazy that 6 years later, this is still occurring.

    ReplyDelete
  27. Hi Carl,
    Good finding but I was wondering why we can't assign custom record page to View action?.

    ReplyDelete
  28. you saved my day, Thanks !!!

    ReplyDelete
  29. You saved my day, Thankssss!

    ReplyDelete
  30. Thank you a million for this

    ReplyDelete
  31. It is throwing this error when I am deploying a custom object, how can I make it work in this situation?

    ReplyDelete
    Replies
    1. It should be the same process as described in the post. I encountered the issue on a custom object.

      Delete
  32. This has been a massive help! The error message is extremely unhelpful. Thank you Carl, you are a hero.

    ReplyDelete
  33. perfect solution for this issue, i was struggling from past few hours

    ReplyDelete