web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Funny observation when you search with wildcard character %be in fetchxml

Arun Vinoth Profile Picture Arun Vinoth 11,615 Moderator
This case is interesting, I personally experienced the same problem in our Production application after an year for one of the Stack Overflow question research.

The wildcard search in fetchxml with "like" operator works great except when the search string starts with "be". It could be "ben" or "bernhard" or anything, the result is empty.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> 
<entity name="contact">
<attribute name="fullname" />
<filter type="and">
<condition attribute="fullname" operator="like" value="%ben%" />
</filter>
</entity>
</fetch>
The reason is looking like "%be" getting encoded into some special character & results in unexpected output.

Solution:

When users are trying to search for %bernhard%, we are handling in code with value="%%bbbernhard%" as a workaround.

We are fortunate to accommodate this workaround in our angular portal code.

This was originally posted here.

Comments

*This post is locked for comments