So, I have a list where I’m using one of the views for my own nefarious purposes; I don’t want users to be able to see it normally, so I set it to hidden in my List Schema. That was fine, and worked.
However, I do need administrators to be able to edit that view – so I gave them a link that would take the to the ViewEdit.aspx page. This worked, except that whenever you tried to save any changes to the view, all you got was an error:
This seemed spurious – “View does not exist” – we’d just looked at the view, so how can it not exist? I tried unhiding the view, and testing, and I found that if I went by my link then I couldn’t save changes, but if I went by the standard UI, everything worked.
In the end I started comparing differences between the pages you got by my link and the UI. What I found was that some of the GUIDs in the page were, like my link, in lower case.
And that was the problem – the GUIDs in the URL needed to be upper case.
I surmise that someone is comparing strings during the ViewEdit save, rather than the GUIDs that they actually are. #FAIL.
One thought on “Annoyance: GUIDs for Views must be upper case”
It is the second blog post I read the past few days where the uppercase behaviour of the list ID parameter in the URL caused the headache. It is a long-known, but not very well documented issue. If someone needs to get the correct URL for a view from code, may find this post useful: