Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

'OnOpenPage' is not a valid trigger on card page

Posted on by 185

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.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,647 Super User 2024 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
    DAnny3211 9,272 Super User 2024 Season 1 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
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: 'OnOpenPage' is not a valid trigger on card page

    noooo...at the end!

    pastedimage1669834311183v1.png

    DAniele

  • Verified answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 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
    ERPlatanos 185 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
    DAnny3211 9,272 Super User 2024 Season 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans