Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

how to make a loop in inventory transfer journal using X++

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

pastedimage1575456242791v1.png

how to add loop in to get more lines

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: how to make a loop in inventory transfer journal using X++

    Hi Evincibles Solutions,

    do you still have some open questions on the topic? If not, could you please mark the helpful answer(s) as verified? Thanks!

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: how to make a loop in inventory transfer journal using X++

    MyTable myTable;
    InventJournalTrans inventJournalTrans;
    
    while select myTable
    {
        inventJournalTrans.clear();
        // Add here all code that you need to populate InventJournalTrans record
        inventJournalTrans.insert();
    }

    Ok, let's assume you want to create one InventJournalTrans for every record in your other table called MyTable.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to make a loop in inventory transfer journal using X++

    i want to apply while loop in it and my data is coming from tables

    buisness requirment is to add more lines in inventory journal by using while loop

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: how to make a loop in inventory transfer journal using X++

    You can use a while loop or a for loop. It really depends what you are looping. Where is your data coming from? Could you explain your business requirement? And in which process are you going to run your code?

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans