Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AL] 'OnNextRecord' is not a valid trigger #3825

Closed
malue19 opened this issue Sep 24, 2018 · 7 comments
Closed

[AL] 'OnNextRecord' is not a valid trigger #3825

malue19 opened this issue Sep 24, 2018 · 7 comments
Labels
al-extensibility suggestion This is either a suggestion of a completely new feature or a fairly big change request.

Comments

@malue19
Copy link

malue19 commented Sep 24, 2018

Hey guys, I am trying to create a trigger in my extension, but VSC shows me, that my trigger is not a valid trigger...
Does anybody know, how to solve this?

grafik

@qutreson
Copy link
Contributor

Hi @malue19, can you provide us with the following information so that we can start investigating your issue?

Which version of the compiler are you using?
What is the error you are getting?
On which type of object are you using this trigger?

The OnNextRecord Trigger can only be used on pages and request pages.

@malue19
Copy link
Author

malue19 commented Sep 24, 2018

Hi @qutreson,

grafik

The error message I get is:
[AL] 'OnNextRecord' is not a valid trigger local trigger OnNextRecord(Steps: Integer): Integer

The object I would like to extend is not a standard object of NAV, it is a page of my own extension.

The version of the AL Language Package I am using is 0.16.19969.

@qutreson
Copy link
Contributor

It is currently not possible to use this trigger on a page extension. It can currently only be used from a page or a request page object.

We will use this issue to track this issue if we consider making this trigger available from page extensions in the future.

In the meanwhile, what you can do, is create an event in the base page and raise this event in the OnNextRecord trigger on the page. Then, you can subscribe to it from your extension and re-use it there.

@qutreson qutreson added suggestion This is either a suggestion of a completely new feature or a fairly big change request. and removed input-needed labels Sep 25, 2018
@bssi-danielf
Copy link

As a clarification: it is not possible to use the OnNextRecord trigger on base product pages (i.e. Customer Card), as the only way to modify these resources is through page extensions or event subscribers.

@epernst
Copy link

epernst commented Mar 10, 2021

Any progress on this? We need this in our extension in v14.

@atoader
Copy link
Contributor

atoader commented Apr 2, 2021

@epernst @bssi-danielf as this is a request for a new feature, please go ahead and post this to our Ideas forum at https://aka.ms/BusinessCentralideas, or vote up the idea if its already there. We're constantly monitoring top Ideas and will consider them for a future release.

@atoader atoader closed this as completed Apr 2, 2021
@epernst
Copy link

epernst commented Jun 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
al-extensibility suggestion This is either a suggestion of a completely new feature or a fairly big change request.
Projects
None yet
Development

No branches or pull requests

5 participants