Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
Today’s tip is from Marius Agur Hagelund “Viking” Lind (actually, I’m confused, perhaps it’s Marius “Viking” Agur Hagelund Lind?). Got a tip of your own? Send it to email@example.com.
Cannot use CONTAINS or FREETEXT predicate on table or indexed view because it is not full-text indexedMean SQL Server
Cannot use CONTAINS or FREETEXT predicate on table or indexed view because it is not full-text indexed
ever got this error message it’s probably because you tried searching using the
SDK using the contains keyword on a field which isn’t full-text indexed.
For me it was searching for systemusers:
I got the following nice error message in return,
which puzzled me at first
Cannot use a CONTAINS or FREETEXT predicate on table
or indexed view 'SystemUserBase' because it is not full-text indexed.
checking in the system, and found that I could search for names there when I
used wildcard characters, and then it dawned on me that all these years of
autocomplete, intellisense and helpers have made my lazy and dumb. Using
wildcards is not the same as using CONTAINS, which is very obvious if you take
a SQL Server 101 course found anywhere, so the solution was as easy as this:
But what about the web api? Well, turns out they removed the Microsoft.Dynamics.Crm.Contains action and only use the Contains keyword (api/data/v9.1/systemusers?$contains(firstname, ‘mike d’). That is, unless you want to perform a full-text search in knowledge base articles:
So lesson learned: Stop being a dinosaur and start using the web api.
Cover photo by Daiga Ellaby
Business Applications communities