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.

5 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