Funny observation when you search with wildcard character %be in fetchxml
Views (1228)
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.
Solution:
When users are trying to search for
We are fortunate to accommodate this workaround in our angular portal code.
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.

Like
Report
*This post is locked for comments