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

Need information about CurrFieldNo

(2) ShareShare
ReportReport
Posted on by 132
When the CurrFieldNo holds the field Number.
 
ex:
I have a field called /A/
one function called in onvalidate trigger
 
function contains this /if/ condition.
 
 
I inserted a record and tried to enter a value in the field /A/ (on business central), onvalidate trigger was triggered and successfully entered into if condition(got the CurrFieldNo).
 
I tried to insert the record from code(Visual studio), performed TableName.validate(/A/,5); but the condition got failed because the CurrFieldNo is getting 0.
 
Please explain when we will get the CurrFieldNo
 
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,225 Most Valuable Professional on at
  • Suggested answer
    YUN ZHU Profile Picture
    95,597 Super User 2025 Season 2 on at
    Hi, you can try the following method.
    Dynamics 365 Business Central: How to get the id, type, length and value of a field by its text name (field name)
     
     
    Thanks.
    ZHU
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at
    You will only get the CurrFieldNo if you enter a value from UI. 
    If you are using code, the CurrFieldNo will always be zero.
     
    You usually use CurrFieldNo to make sure that the code is only triggered when a user fills in a specific field. It also prevents the same code from running multiple times.

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 3,010

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans