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, ...
Unanswered

InventMovement class to generate inventory transaction records

(0) ShareShare
ReportReport
Posted on by 678

Hi All,

When we update PurchQty in the line, we add PurchLine::modifyPurchQty and InventMovement::bufferSetRemainQty methods.

I don't quite understand how / which elements of InventMovement class are used to generate inventTrans table records with the update of the PurchQty.

For example, if we look at InventMov_Purch class setTransQty method, purchLine.QtyOrdered is updated. but how is this field value update used to generate invent transaction record? which lines of code show the generation of inventTrans table records from InventMovement class instance? 

    public void setTransQty(InventQty  _qtyInvent)
    {
        // QtyOrdered should only be updated for inventoried items
        if (purchLine.isStocked())
        {
            purchLine.QtyOrdered = _qtyInvent;
        }
    }

Thank you. 

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi ShawnDEV,

    Please check the initInventTransFromBuffer method in the InventMovement  class.

    public void initInventTransFromBuffer(
            InventTrans     _inventTrans,
            InventMovement  _movement_orig)
        {
            _inventTrans.ItemId                = this.itemId();
            _inventTrans.InventTransOrigin     = this.inventTransOriginId();
            _inventTrans.ProjId                = this.projId();
            _inventTrans.ProjCategoryId        = this.projCategoryId();
            _inventTrans.ActivityNumber        = this.activityNumber();
            _inventTrans.DateExpected          = this.transDate() ? this.transDate() : DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone());
            _inventTrans.TimeExpected          = this.transSchedTime();
            _inventTrans.ShippingDateRequested = this.shippingDateRequested();
            _inventTrans.ShippingDateConfirmed = this.shippingDateConfirmed();
            // 
            _inventTrans.Storno_RU             = this.parmStorno_RU();
            // 
    
            InventTransOriginId markingRefInventTransOrigin = _movement_orig == null || _movement_orig.markingRefInventTransOrigin() == _inventTrans.MarkingRefInventTransOrigin ? this.markingRefInventTransOrigin() : _inventTrans.MarkingRefInventTransOrigin;
            _inventTrans.setMarking(markingRefInventTransOrigin);
        }

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 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans