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 :
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,438 User Group Leader 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,438 User Group Leader 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,438 User Group Leader 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

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans