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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Business Central forum

Is There a VS Code trigger for OnNextRecord in Pages or Page Extensions

(0) ShareShare
ReportReport
Posted on by 1,305

I've used OnNextRecord to test complex field relationships in the past but do not see a like trigger in the AL environment.  Any suggestions?

Categories:
I have the same question (0)
  • Dan Eckhoff Profile Picture
    1,305 on at

    Mohit,

    Layout{} doesn't matter.  I added it to my "Hello World" to make sure, but the whole discussion came up because of a real project I'm doing where I couldn't find OnNextRecord.

    Teddy,

    OnAfterGetRecord or OnAfterGetCurrRecord won't work because I'm looking to test some extensive and convoluted field relationships prior to leaving the page.  I've got code in OnQueryClosePage that works when closing the page, but that trigger isn't fired when using the "Previous" and "Next" buttons within the Ribbon.

    Best Regards,

    Dan

  • MohitMalik8085 Profile Picture
    100 on at

    h

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    Try to test if you can use OnAfterGetRecord or OnAfterGetCurrRecord for your logic instead.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    It's not on mine as well.

    Microsoft probably disabled the OnNextRecord trigger for dev.

  • Dan Eckhoff Profile Picture
    1,305 on at

    I've tried other things as well:

    1. Upgraded to CU4

    2. Rebuilt Symbols

    3. Upgraded the AL Language Extension

    4. Compiled and Synchronized a dozen times

    Help!!!

  • Dan Eckhoff Profile Picture
    1,305 on at

    No worries, Mohit.  I appreciate the response...just hope someone else picks it up as well.  Frustrating to say the least...

  • MohitMalik8085 Profile Picture
    100 on at

    Sorry Dan,

    Whatever I tried till now already written..

    But () makes difference because for OnNextRecord(), breckets holds the parameter.

    I had also faced same issue to find the trigger but later I got the same by doing this only...

    Well thanks. ...

  • Dan Eckhoff Profile Picture
    1,305 on at

    Mohit,

    The () don't make any difference, however, I did try that several times before and again after your last message just to be sure.

    Thank you,

    Dan

  • Suggested answer
    MohitMalik8085 Profile Picture
    100 on at

    Hi Dan,

    Please remove both breckets () and try type onnextrecord.

    I have written in my previous reply that remove onwhat().

    Please try.

    Regards

    Mohit Malik

  • Dan Eckhoff Profile Picture
    1,305 on at

    Mohit,

    2605.OnNextRecord.png

    I'm on AL Language version 3.0.115791 and I still don't see OnNextRecord.  I've uploaded a screenshot showing my options.  This was on a fresh "Hello World".  I did change the mod so that it was on the Customer Card rather than the list.  The mod runs fine before I try to add OnNextRecord().

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

Season of Giving Solutions is Here!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans