Error: Data could not be saved. The DELETE statement conflicted with the REFERENCE constraint FK_ADHOCQUERY_FOLDERID" - when saving the Manage Query Folders form"

Users are able to manage how query folders are structured within CRM.  This error occurs when non-administrative users click Save on the Manage Query Folders form, Ad-hoc Query Hierarchy Edit Form 2,  even without having made any changes.

Error: Data could not be saved.  The DELETE statement conflicted with the REFERENCE constraint "FK_ADHOCQUERY_FOLDERID". The conflict occurred in database "<database name>", table "dbo.ADHOCQUERY", column 'FOLDERID' - when saving the Manage Query Folders form
Download and install the latest patch, which contains all fixes from previous patches. If you are running an older version, download and install the latest version and then the patch. 

Environment

 2.91.1535, patch 85
 2.91.1535, patch 108 ; 3.0.516, patch 9 ; 2.93.2034, patch 78 ; 2.94.1524, patch 65

Was this article helpful?