Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
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 | Upcoming TechTalks
I tried to enable full-text search in our MS CRM Instance but faced some issues. After FTS is enabled I can't use quick search at all because SQL errors occur. After some analysis, I found out that SQL queries that search trying to execute contain ActivityPointerBase table instead of EmailBase table, therefore, I can't use custom fields at all. There aren't any of them in ActivityPointerBase table. I can't disable them by the business requirements and can't enable FTS because quick search doesn't work at all. What can I do?
We're using CRM Dynamics 365 8.2 (on-premises)
Hope you are well.
Can you share the SQL error that you are facing?
Custom fields on Email entity will be retrieved from the EmailBase, while all the other activities common fields, will use activityPointerBase.
All activities views will still try to search in the fields that you configured for example on email Quick find, but for seeing a column on Email entity for a custom field, you need to go deeper on the activities section and go for the email entity views.
But seems we don't have enough information right now to discuss understand the scenario any further.
Can you extend your scenario please with more detailed explanations?
It's just a generic "invalid column name 'yg1_correspondence'" error, nothing special. After using SQL Profiler I found out that entire query looks like this:
exec sp_executesql N'WITH __QuickFind__ as (select top 10001 [ActivityId] from (
SELECT "email0".[ActivityId] AS [ActivityId] FROM [ActivityPointerBase] AS "email0" JOIN ContainsTable([yg1_correspondenceBase], (yg1_name), @yg1_correspondenceName0) AS "FTSLogical0" ON "email0".[yg1_correspondence] = "FTSLogical0".[Key]
SELECT "email0".[ActivityId] AS [ActivityId] FROM [ActivityPointerBase] AS "email0" JOIN ContainsTable([ActivityPointerBase], (Subject, Sender, ToRecipients), @Subject0) AS "FTSExtension0" ON "email0".[ActivityId] = "FTSExtension0".[Key]
SELECT "email0".[Key] AS [ActivityId] FROM ContainsTable([EmailBase], (yt1_copy_string), @yt1_copy_string0) AS "email0") as [__QuickFindInternal__])select
top 251 "email0".Subject as "subject"
, "email0".RegardingObjectId as "regardingobjectid"
, "email0".StatusCode as "statuscode"
, "email0".ModifiedOn as "modifiedon"
, "email0".yg1_statusactivity as "yg1_statusactivity"
, "email0".CreatedOn as "createdon"
, "email0".DirectionCode as "directioncode"
, "email0".yt1_attachmentsarchived as "yt1_attachmentsarchived"
, "email0".yg1_correspondence as "yg1_correspondence"
, "email0".ActivityId as "activityid"
, "email0".ProcessId as "processid"
, "email0".yg1_existattachment as "yg1_existattachment"
, "email0".yt1_hiddencopy_string as "yt1_hiddencopy_string"
, "email0".yt1_copy_string as "yt1_copy_string"
, convert(bigint, "email0".VersionNumber) as "versionnumber"
, "email0".RegardingObjectIdYomiName as "regardingobjectidyominame"
, "email0".RegardingObjectIdName as "regardingobjectidname"
, "email0".RegardingObjectTypeCode as "regardingobjecttypecode"
, "email0".yg1_correspondenceName as "yg1_correspondencename"
, case when (select COUNT(*) from [__QuickFind__]) = 10001 then 1 else 0 end as [__QuickFindLimitValue__]
, convert(bigint, "processidworkflowworkflowid".VersionNumber) as "processidworkflowworkflowid.versionnumber"
Email as "email0" WITH (NOLOCK) left outer join Workflow as "processidworkflowworkflowid" WITH (NOLOCK) on ("email0".ProcessId = "processidworkflowworkflowid".WorkflowId)
[email0].[ActivityId] in (select [ActivityId] from [__QuickFind__]) order by
, "email0".ActivityId asc',N'@Subject0 nvarchar(200),@yg1_correspondenceName0 nvarchar(200),@Sender0 nvarchar(200),@yt1_copy_string0 nvarchar(200),@ToRecipients0 nvarchar(200)',@Subject0=N'((("zaza*" OR FORMSOF(FREETEXT, "zaza"))) OR ("zaza"))',@yg1_correspondenceName0=N'((("zaza*" OR FORMSOF(FREETEXT, "zaza"))) OR ("zaza"))',@Sender0=N'((("zaza*" OR FORMSOF(FREETEXT, "zaza"))) OR ("zaza"))',@yt1_copy_string0=N'((("zaza*" OR FORMSOF(FREETEXT, "zaza"))) OR ("zaza"))',@ToRecipients0=N'((("zaza*" OR FORMSOF(FREETEXT, "zaza"))) OR ("zaza"))'
We require to use search on fields "yg1_correspondence" and "yt1_copy_string". The first one is a lookup field and the second is the regular string.
It's weird that there's ActivityPointerBase in the query because I also used profiler with FTS turned off and there was only EmailBase table in the query.
I can actually replicate this same problem on my vanilla v9.
I have been trying to find some official documentation that could justify this behavior, with statements around being by design or a limitation but i couldn't find them.
My next step here is to test the same but using another type of entity other than Email, where i will basically add a lookup to another entity and enable quickfind "find" on that field.
Will come back to you early next week.
Seems this behavior happens with all entities of type activities.
Let me try to understand if there is a design limitation here.
On the meanwhile, are you still searching for a solution here or you found any workaround that fits your business logic?
After additional research we found out that the problem only occurs when we're using quick search on fields of lookup type. Text fields work perfectly fine. We're going to solve this problem with a workaround like this: create textfield and fill the value with a lookup name field using workflow or sql query. Obviously we'll also change lookup field in quickfind search view with a similar text field.
Thank you for the feedback.
Yes, it's only happening with lookups and activity entity types.
The workaround makes sense and is also a best practice once a slow SQL query is due to a lookup making a join on a huge secondary table.
I'll still engage our Product Group to see if we can document it somehow.
I'll get back at the end of week and will keep this thread open for this purpose.
After discussing this with PG, it was recognized the defect and created the workitem to fix it.
This is although expected to be released only on the upcoming next onprem version that will be tentative to be released mid 2021.
Thank you for the information. Can you mark my workaround post as the answer because I can't mark my own answer or should I mark one of your messages so the other people who face this problem will understand that this is not one of those never answered problems?
Business Applications communities