Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Insert a New Record Based on User Click

(0) ShareShare
ReportReport
Posted on by 69

Hello,

I have my page and I added an action button "Allow Cancel" and every time user clicks "allow cancel" It fires a customized report. What I want is whoever clicks "allow cancel" button creates a new record in my log table and shows when. How can I do this?

Thank you

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Insert a New Record Based on User Click

    Hi,

    Allow Cancel - OnAction()
    //.....other coding....
    REPORT.RUNMODAL('MYReport');
    mylogtable.reset;
    mylogtable.INIT;
    mylogtable."Operation date" := TODAY;
    mylogtable."Operation time" := TIME;
    mylogtable.UserID = USERID;
    //.....other coding....
    mylogtable.insert;

    Then make a new list page

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,777 Moderator on at
    RE: Insert a New Record Based on User Click

    Just add the codes in the OnAction button. Can you access the C/AL Editor ?

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
EH-09052238-0 Profile Picture

EH-09052238-0 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 1

Featured topics

Product updates

Dynamics 365 release plans