web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Record is inserted in to table but not showing in form

(0) ShareShare
ReportReport
Posted on by 1,737

I am trying to copy the movement journal line in inventory management, i am writing the class to copy the previous line and insert in to table.

data is inserted in to table but not showing in the form

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Record is inserted in to table but not showing in form

    I also faced the same issue today and had come across with this thread.

    It is happening because of India localisation. You need to insert data in InventJournalTrans_IN table.

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    I am Deleted all customizations from form and tried it also it is not working.

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    In this form there is no query and no additional data sources.

    add two are three new columns in your system and try it and let me know.

  • Mea_ Profile Picture
    60,284 on at
    RE: Record is inserted in to table but not showing in form

    Like did you add any ranges on from query or maybe you joined additional data sources ?

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    What exactly the filters??

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    Yes i am customized the form adding three new fields in line level.

  • Mea_ Profile Picture
    60,284 on at
    RE: Record is inserted in to table but not showing in form

    Hey srinivas,

    I just tried your code and it works perfectly for me. If record get inserted into a table I have no idea,  maybe you have customization on the form, some filters ?

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    Hi,

    Please find the below code.

    class declaration

    class ABInventJournalTransCopy

    {

       InventJournalTrans  InventJournalTrans;

    }

    Parmmethod

    public InventJournalTrans parmInventJournalTrans(InventJournalTrans _inventJournalTrans = inventJournalTrans)

    {

       inventJournalTrans = _inventJournalTrans;

       return inventJournalTrans;

    }

    Run method

    private void run()

    {

       InventJournalTrans  InventJournalTransLocal;

       try

       {

           ttsbegin;

           InventJournalTransLocal.data(InventJournalTrans);

           InventJournalTransLocal.LineNum =   InventJournalTrans::lastLineNum(InventJournalTrans.JournalId) + 1;

           if(InventJournalTransLocal.validateWrite())

           {

               InventJournalTransLocal.insert();

           }

           ttscommit;

       }

       catch (Exception::Deadlock)

       {

           retry;

       }

       catch (Exception::UpdateConflict)

       {

           if (appl.ttsLevel() == 0)

           {

               throw Exception::UpdateConflictNotRecovered;

           }

           else

           {

               throw Exception::UpdateConflict;

           }

       }

    }

    Construct method

    public static ABInventJournalTransCopy construct()

    {

       return new ABInventJournalTransCopy();

    }

    main method

    public static void main(Args _args)

    {

       ABInventJournalTransCopy    ABInventJournalTransCopy;

       if(_args.record() && _args.dataset() == tableNum(InventJournalTrans))

       {

           ABInventJournalTransCopy    =   ABInventJournalTransCopy::construct();

           ABInventJournalTransCopy.parmInventJournalTrans(_args.record() as InventJournalTrans);

           ABInventJournalTransCopy.run();

       }

    }

  • Mea_ Profile Picture
    60,284 on at
    RE: Record is inserted in to table but not showing in form

    Hi srinivas,

    It's hard to say what is wrong without seeing actual code, but you can look at InventJournalCopy class, it copies whole journal so you can look how it's done and compare to your code.

  • srinivas pamidi Profile Picture
    1,737 on at
    RE: Record is inserted in to table but not showing in form

    Any thing is required to add the record in to form??

    I am created one class and action menu Item and add this menu Item in to Invenjournalmovement form

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans