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 :
Small and medium business | Business Central, N...
Answered

'OnOpenPage' is not a valid trigger on card page

(0) ShareShare
ReportReport
Posted on by 73

Hello all,

I am following along with Microsoft's Learning Module, "Introduction to the basics of AL programming in Dynamics 365 Business Central" and on the Exercise page. It is simply creating a card page of data types.

Here is the link

I've run into an error following this page exactly.

pastedimage1669824592621v1.png

I'm having trouble finding any solid documentation to understand why this issue is occurring.

Question 2) Are there any better resources to learn AL than Microsoft's documentation? I'm finding their content to be lackluster. I follow these step-by-step guides, only to run into seemingly basic errors.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    hi

    I think microsoft's documentation is very good

    but you could also look for videos on you tube that can help you

    for example triggers in a page should be inserted after the layout

    pastedimage1669826275683v2.png

    check my answer if it helped you, thanks

    DAniele

  • ERPlatanos Profile Picture
    73 on at

    Daniele,

    The trigger is in the action section after the layout section.

    pastedimage1669826761243v1.png

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

    OnOpenPage is not part of the action. It is part of the page itself.

    Put it after the actions {}, not inside one of the action.

    layout

    {

    }

    actions

    {

    }

    trigger OnOpenPage

    begin

    end;

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    noooo...at the end!

    pastedimage1669834311183v1.png

    DAniele

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    noooo...at the end!

    3312.pastedimage1669834311183v1.png

    DAniele

  • Suggested answer
    YUN ZHU Profile Picture
    95,739 Super User 2025 Season 2 on at

    Hi, just adding some info.

    You can use AL Snippets to support your coding.

    https://yzhums.com/2844/

    pastedimage1669857301848v1.png

    Hope this helps.

    Thanks.

    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans