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 :
Microsoft Dynamics CRM (Archived)

Dynamics V9 Search for an entity field give a generic SQL error when lookup text is added

(0) ShareShare
ReportReport
Posted on by

Hi

I have migrated my 8.2 bd to 9 on premises, browsing the web to check all is working well, i found an error, when trying to put a contact, or parent account the search failed when a put some on the field, whitout text the search works.

eneric SQL error. ---> System.Data.SqlClient.SqlException: Incorrect syntax near ')'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass104_0.<InternalExecuteReader>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventI

*This post is locked for comments

I have the same question (0)
  • Sreevalli Profile Picture
    3,256 on at

    Hi Paraya,

    Where are you trying to search? 

  • Paraya Profile Picture
    on at

    lookup for parent account or contact in account form

  • Sreevalli Profile Picture
    3,256 on at

    Hi,

    Do you have any Business rule or JS on customer field?

  • Paraya Profile Picture
    on at

    Account form has no scripts, or business rules.

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    If you have recently upgraded to 9.0 and you believe that the issue is after upgrade then I suggest you to raise MS ticket, since there are some V9.0 known issues with search functionalities

  • Paraya Profile Picture
    on at

    Thank you, can you tell who raise the ticket please.

    have a nice day

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi!

    Go to Office 365 Admin Center.

    Click on Support -> New Service Request

    community.dynamics.com/.../how-to-create-a-support-request-for-dynamics-365-issue-from-office-365-admin-portal

  • Paraya Profile Picture
    on at

    Finally get it working

    The Generic Error was because, no index created for full-text search.

    Thanks

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Great, Happy CRMing!!

  • Community Member Profile Picture
    on at

    Hi Paraya, when you say it works, I assume you mean that you do not get the SQL error any more. But does the functionality of the full text search actually work? For example, if you create a contact with a last name with a space like "Van Horne", and then search for "Horne", will it find the record? We also ran into this problem when we upgraded from V8.2 to V9 and have not resolved it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans