Solve Sitecore Fast Query Parse Exception

If you are developing any Sitecore application and if you are using Fast Query a lot then you would have got the Parse Exception while querying the Item. In this article Let’s look at How to Solve Sitecore Fast Query ParseException?

What is Fast Query ParseException in Sitecore?


Whenever you are using Sitecore query and if the Item name contains “-” (hyphen/dashes) you need to escape it with a character “#” (hash). Also, if the item names have the Words “and” / “or” you need to escape the item name in the fast query using “#”.

How to Solve Sitecore Fast Query  Parse Exception by using Escape Character #

While querying the Item in Sitecore if you have dashes (-) or “and” or “or” in the item name escape the item name with a # character.

Check out the below example where item name consists of the hyphen and it is escaped using a hash character.

Escape “and” / “or” in Sitecore Item

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.