web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    YUN ZHU Profile Picture
    89,830 Super User 2025 Season 2 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    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

  • Suggested answer
    DAnny3211 Profile Picture
    11,201 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    noooo...at the end!

    3312.pastedimage1669834311183v1.png

    DAniele

  • Suggested answer
    DAnny3211 Profile Picture
    11,201 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    noooo...at the end!

    pastedimage1669834311183v1.png

    DAniele

  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,008 Super User 2025 Season 2 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    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;

  • ERPlatanos Profile Picture
    73 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    Daniele,

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

    pastedimage1669826761243v1.png

  • Suggested answer
    DAnny3211 Profile Picture
    11,201 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    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

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans