web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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 156
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
 
  • Gerardo Rentería García Profile Picture
    27,623 Super User 2026 Season 2 on at
  • Suggested answer
    YUN ZHU Profile Picture
    104,090 Super User 2026 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,306 Super User 2026 Season 1 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans