Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Table Query Error: Expected value between 1 and 1 inclusive. #519

Closed
clintonbale opened this issue Jul 23, 2024 · 0 comments · Fixed by #531
Closed

Audit Table Query Error: Expected value between 1 and 1 inclusive. #519

clintonbale opened this issue Jul 23, 2024 · 0 comments · Fixed by #531

Comments

@clintonbale
Copy link

Was playing around with querying the audit table and ended up running into an error, I've narrowed it down to using distinct on the audit table. Any of the following queries throw the same error, example:

select distinct audit.createdon, audit.objectid from audit where audit.action = 64 and audit.objectidtype = 'systemuser'

select distinct audit.objectid from audit

Throws this error

Msg 10337, Level 16, State 1, Line 7
Expected value between 1 and 1 inclusive.

System.ArgumentOutOfRangeException: Expected value between 1 and 1 inclusive.
Parameter name: entityExpression
Actual value was 2.
See the Execution Plan tab for details of where this error occurred

  • Deployment: Online
  • DB Version: 9.2.24071.168
  • Connection Controls Version: 1.2023.6.56
  • XrmToolBox Version: 1.2023.12.68
  • Tool Version: 9.2.0.0
@clintonbale clintonbale changed the title System.ArgumentOutOfRangeException: Expected value between 1 and 1 inclusive. Audit Table Query Error: Expected value between 1 and 1 inclusive. Jul 23, 2024
@MarkMpn MarkMpn linked a pull request Aug 24, 2024 that will close this issue
@MarkMpn MarkMpn mentioned this issue Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant