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 :
Microsoft Dynamics NAV (Archived)

TESTFIELD code stopping 'next' button

(0) ShareShare
ReportReport
Posted on by

I'm putting some code into some pages to ensure fields have values.  Below is what I've used on an opportunity page, the same under both OnClosePage and OnNextRecord.

It does the tests I want, but when I put it under OnNextRecord, it means the 'Next' or 'Previous' buttons won't work? When I click them it does the tests, but if they are all ok it doesn't go to the next record.

TESTFIELD("Customer Class Code");
TESTFIELD("End User Class Code");
TESTFIELD("Company Potential Rating");
TESTFIELD(Score);
TESTFIELD("Campaign No.");

IF("Literature Only" = FALSE)
THEN
  TESTFIELD("Hire Sale Class Code");
  TESTFIELD("Install Class Code");
  TESTFIELD("Surveyor / Quoter");


Please help with what I need to change to make the next button work?

Thank you!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: TESTFIELD code stopping 'next' button

    hi,

    add

    exit(next(Steps));

    at the end of your code in the onnextrecord trigger.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans