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)

Transfer order lines

(0) ShareShare
ReportReport
Posted on by

Hi,

I am using the below mentioned in the modifiedField method of InventTransferLine to create a Invent tranfer line as soon as the value is changed in a particular field.

However, the values are getting updated in all fields except inventory dimensions. Despite updating value in the inventory dimensions it is still taking blank values.

I am posting the code for reference. Kindly let me know if there is any issue in the code snippet:

case fieldNum(InventTransferLine, PwCItemBarCode):

this.initValue();

this.ItemId = "XYZ";

this.initFromInventTable("XYZ");
this.initFromInventTransferTable(inventTransferTable false);

this.InventDimId   = inventDimLocal.inventDimId;
this.RemainStatus = InventTransferRemainStatus::Shipping;
this.ShipDate = systemDateGet();
this.ReceiveDate = systemDateGet();
this.LineNum = InventTransferLine::lastLineNum(this.TransferId) + 1;

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    1)  Has inventDimLocal.inventDimId a  ,  value at time when code is executed?

    2) might be value is changed anywhere after inventDimLocal.inventDimId and before actual insert

  • Community Member Profile Picture
    on at

    Hi Sohaib,

    Yes the InventDimLocal.InventDimId has value till the time debugger is being exited.

    And the value is not getting changed anywhere.

  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    yeah may be, hidden ghost or vampire eating value, check your server room. don't go alone, take IT infrastructure guy with you :)

    if value is being set at time of execution, I believe its being overridden somewhere afterwards. Debug it or give us some information to reproduce scenario.

  • Community Member Profile Picture
    on at

    :D

    I debugged but the value stays consistent till the time debugger is running.

    You could try to replicate by adding a new field on transfer order lines table and then in the modifiedField() of the transfer lines table, paste the above mentioned code.

  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    if I will simply copy-paste above code how value of inventDimLocal.inventDimId will be set initially.

    above code shows how you assign new lines inevntDim to inventDimLocal.inventDimId

    but above code does not shows how you set value in inventDimLocal.inventDimId

    I mean where buffer of inventDimLocal is being set?

    in existing AX, method modifiedField() of inventTransferLine I cannot see inventDimLocal

  • Asim Saeed Profile Picture
    575 on at

    Can you check the value till time of insertion of the value in InventDim, there is something which we are missing in during debug i believe.

    Also at times i faced similar issue, when i saw the values being inserted in the table but surprisingly not showing (ghost or something ;) ) so, table synchronize or AOT restart resolved the problem.

    Finally, why not using eventing framework to for your custom code in modifiedField method.

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
GiacomoRovai Profile Picture

GiacomoRovai 4

#3
Douglas Noel Profile Picture

Douglas Noel 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans