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)

How automatically showing value in Journal Line form

(0) ShareShare
ReportReport
Posted on by 4

Hello Experties,

In Inventory Management > Journals > Inventory Adjustment . In Inventory Adjustment form when I create new journal  with new Journal ID and then click on Line button , one new Journal Line form is creating .

In Journal Line form in General Tab have a field named Journal , in this field JournalID is automatically displaying, which is on Inventory Adjustment form.

I want to know how JournalID is automatically displaying in Journal  field on Journal Line form in General Tab.

where is the code written for achieve this functionality.

Please suggest.

Thanks

Naveen Mishra 

*This post is locked for comments

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

    Hi Naveen Mishra,
    Take a look at initFromJournalTable() method of JournalTransData class. If you will put breakpoint there you can see how it's get called.

  • Naveen Mishra Profile Picture
    4 on at

    Hi ievgen Miroshnikov,

    Thanks for reply.

    As per your suggestion i puted breakpoint at initFromJournalTable() method of JournalTransData class but nothing happening.

    Actually i have created a customize field on Inventory Adjustment form named Vendor and add lookup on this field from vendor master .when i create journal i am  selecting vendor as well.

    after selecting vendor field when i click on Line button new form is creating named Journal Line form , in this from in General tab JournalID is automatically displaying in Journal field . I have added customized field named vendor on Journal Line form in General Tab also.

    Now i want displaying vendor value in the form as JournalID is displaying automatically .

    So, to achieve this functionality where need to write or add my code for vendor as well.

    Please suggest.

    Thanks.

  • Mea_ Profile Picture
    60,284 on at

    Do you have debug enabled for code running on server ?

  • Naveen Mishra Profile Picture
    4 on at

    yes ,  debug is enabled for code running on server.

    After restart the ax ,debugger is working.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    You can put your code to initFromJournalTable() method of InventJournalTransData class.

    If you want to have this logic only for Adjustment  journal you need to add check on journal type otherwise this change will affect all inventory journals.

  • Naveen Mishra Profile Picture
    4 on at

    I am writing below code in initFromJournalTable() method of InventJournalTransData class.

    inventJournalTrans.Vendor                   = inventJournalTable.Vendor;

    but not achieving, Can you please suggest what need to write exactly here.

    Thanks.

  • Mea_ Profile Picture
    60,284 on at

    It looks ok. But it will work only when you create new line, so existing lines won't be changed. Did you try to debug and see if this code get executed ever ?

  • Naveen Mishra Profile Picture
    4 on at

    Yes, after  put breakpoint here when i create new journal  and click on line button, debugger is opening  but value is showing is " null " in vendor field.

  • Mea_ Profile Picture
    60,284 on at

    In vendor field of inventJournalTrans or inventJournalTable ? Do you have it in inventJournalTable at all ?

  • Verified answer
    Naveen Mishra Profile Picture
    4 on at

    Hi ievgen Miroshnikov,

    Thanks for reply.  

    Issue  Resolve.

    In this scenario two maps is using named  JournalTableMap and JournalTransMap.

    So, in both maps i added vendor field and in mapping node map the vendor field

    with InventjournaTable aand InventJournalTrans, then in JournalTransData.initFromJournalTable() method I added code.

    journalTrans.Vendor      = this.journalTableData().journalTable().Vendor;

    It's working.

    Thanks.

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
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans