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 NAV (Archived)

Insert Record on action click one page to another table

(0) ShareShare
ReportReport
Posted on by

I want to fetch some columns from the selected row and insert it into another tables on action click . I have added one action on list page.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    I Gusti Made Ari Profile Picture
    3,600 on at

    You can use SETSELECTIONFILTER to get selected record  and then do the insert

    docs.microsoft.com/.../setselectionfilter-function

  • Bodhi Profile Picture
    558 on at

    If only select one raw, define a variable: l_anotherTable link  to anther table

    Under <XX> - OnAction()

    l_anotherTable.RESET;

    l_anotherTable.INIT;

    CLEAR(l_anotherTable);

    l_anotherTable.FIELD := Rec.FIELD;

    ...

    l_anotherTable.INSERT(TRUE);

    IF SECTECT MORE THAN ONE LINE, we need to define a variable link to currenct page source table: l_currenctTable

    Under <XX> - OnAction()

    l_anotherTable.RESET;

    l_currenctTable.RESET;

    CurrPage.SETSELECTIONFILTER(l_currenctTable);

    if l_currenctTable.FINDFIRST THEN

     REPEAT

       l_anotherTable.INIT;

       CLEAR(l_anotherTable);

       l_anotherTable.FIELD := l_currenctTable.FIELD;

       ...

       l_anotherTable.INSERT(TRUE);

     UNTIL   l_currenctTable.NEXT = 0;

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    And what did you tried so far?

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 NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans