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 :
Finance | Project Operations, Human Resources, ...
Answered

On Hand Inquiry form SQL Error

(0) ShareShare
ReportReport
Posted on by 758

Hi Everyone,

Whenever I click on below path,

Inventory Management > Inquiries > On hand

below error list pops up,

Cannot select a record in ().
The SQL database has issued an error.

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]The EXECUTE permission was denied on the object 'sp_WHSOnHand', database 'CWM_AX2012R3_TST', schema 'dbo'.

SQL statement: DECLARE @AVAILPHYSICAL numeric(32, 16);
DECLARE @AVAILORDERED numeric(32, 16);

EXECUTE sp_WHSOnHand
@DATAAREAID = N'301',
@PARTITION = 5637144576,
@ITEMID = N'CNSPCK002',
@LEVEL = 0,
@INVENTSITEIDLEVEL = 1,
@INVENTLOCATIONIDLEVEL = 2,
@INVENTSTATUSIDLEVEL = 3,
@WMSLOCATIONIDLEVEL = 4,
@LICENSEPLATEIDLEVEL = 5,
@AVAILPHYSICAL = @AVAILPHYSICAL output,
@AVAILORDERED = @AVAILORDERED output;

SELECT @AVAILPHYSICAL as [AVAILPHYSICAL],
@AVAILORDERED as [AVAILORDERED];

OnHand_5F00_error.png

How this can be resolved? Please help.

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Something is wrong with AOS account permissions, you can try to run next SQL script:

    USE [CWM_AX2012R3_TST]
    GO
    
    GRANT EXECUTE TO [domain\aosservice]
    GO

    where "domain\aosservice" is AOS service account

  • Rhushikesh R Profile Picture
    758 on at

    Hi Ievgen,

    Actually I don't have access to SQL server at the moment. Can this issue be resolved through AX? Or there is nothing wrong in AX and I have to run the script from SQL only?

  • Mea_ Profile Picture
    60,284 on at

    It's a SQL permission error and you need access to SQL to fix it

  • Rhushikesh R Profile Picture
    758 on at

    Hi Ievgen,

    Thanks for help. It did resolve my issue.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans