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...
Suggested Answer

Unable to validate condition if user uses next or previous button on card ribbon

(0) ShareShare
ReportReport
Posted on by 45

I used some validation on a card page inside an OnOpenPage trigger and it is it working fine until I start using previous and next button within ribbon on card page.

Any suggestions to make it work

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    When you move between records the page is not opened again so your "OnOpenPage" trigger will not be executed as a result for that.

    You need to use the "OnAfterGetRecord" trigger to have something executed when you move between records in a page.

  • Aditya raut Profile Picture
    45 on at

    Thanks NorthW , but I have already tried "OnAfterGetRecord" but it is not working correctly for my validation

    Basically I'm making Editable property to false for it but no luck

  • Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    Maybe you can share your code ?

  • Aditya raut Profile Picture
    45 on at

    pastedimage1639573326099v2.png

    So this is the condition and if it is correct then I need this editable property of page to false.

    But even if the condition validates page is still editable.

    However this condition works on "OnOpenPage" trigger but that previous and next button ruins functionality

  • Lars Lohndorf-Larsen Profile Picture
    on at

    Hello,

    I think you are out of luck on this one. According to this:

    github.com/.../1664

    Quite: "We do not support dynamic changes to the page Editable property, except via CurrPage.Editable(FALSE) in OnOpenPage.".

    I will watch here in case someone else has some ideas. Maybe you can change Editable for groups or fields, but I could also not find any ways to do that. Sorry I dont have better advice.

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

    Hi, Is it possible to try to close the current page and open a new page?

    A simple example:

    https://yzhums.com/16756/

    Hope this will help.

    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,917

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,161 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans