web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Showing physicalInventCalculated() display method on (inventsum table)as calumon (field) on report.

(0) ShareShare
ReportReport
Posted on by 3,124

Onhand-displaymethod.png

Dear Experts,

I want to show Physical inventory field On Hand form and code of display method on table is( 

display public InventQtyPhysicalOnhand physicalInventCalculated()
{
return this.PostedQty + this.Received - this.Deducted + this.Registered - this.Picked;

and available physicalfields and code is on datasource of form(

display public InventQtyAvailPhysical availPhysical(InventSum _inventSum)
{
return inventAvailabilityFormCache.availabilityFromSumJoinedWithDim(_inventSum, inventDim_ds).availPhysical();
}

Both of the fields are on (On Hand form)  both fields i want to show in Report as a field as both of the column on  OnHand form are display method, please help.

Thanks and Regards,

Shabir Ahmad

*This post is locked for comments

I have the same question (0)
  • udaY-ch Profile Picture
    5,175 on at

    Hi, Ahmad

    Use the below code to get the available physical and total available qty

       InventQty       availQty, totalQty;

       ItemId          itemId = ""; //ItemId

       InventDim       inventDim;

       InventOnhand    inventOnHand;

       InventDimParm   inventDimParm;  

       inventDim.inventSiteId = "";//SiteId

       inventDim.InventLocationId = "";//Locationid

       inventDimParm.initFromInventDim(inventDim);

       inventOnHand = inventOnHand::newParameters(itemId,inventDim,inventDimParm);

       availQty = inventOnHand.availPhysical();

       totalQty = inventOnHand.availTotal();  

       info(strfmt("Available Qty: %1",availQty));

       info(strfmt("Available Qty: %1",totalQty));

    /Uday.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans