Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Import Journal Movement with X++

Posted on by 20

Hi, I have a Upload button in journals -> movement which I can upload csv data type. When I upload, the data all are insert to Journal movement header. 
What I want is when the csv data is uploaded, I get one header with one Journal number and all the data are insert to Journal movement lines of the journal number. Please help me.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Import Journal Movement with X++

    Assuming that you have the button in the journal header, you can call the following code

    inventJournalTrans_ds.reread();
    inventJournalTrans_ds.executeQuery();

  • Suggested answer
    Leo Chen Profile Picture
    Leo Chen on at
    RE: Import Journal Movement with X++

    You can put some form ds refresh code into your customized Upload button. eg _ds.research(); or _ds.executequery(). See below -

    mohsinkhalid.com/.../

  • HelioBuenos Profile Picture
    HelioBuenos 20 on at
    RE: Import Journal Movement with X++

    Now I have another problem. when I finish importing the csv data, my form do not get refresh  by itself. When I close the form then open it again, it will show the data that I import before.

  • HelioBuenos Profile Picture
    HelioBuenos 20 on at
    RE: Import Journal Movement with X++

    Hi, after some struggling the link you share is really helpful!

    Thank you

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Import Journal Movement with X++

    Hi,

    You can use something like this to create headers and lines.

    Please share your existing code here as well in case you want us to take a look at what logic you could implement

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans