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 68
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
 
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    Teddy Herryanto (Th... 13,025 Moderator on at
    Need information about CurrFieldNo
    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.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,925 Super User 2025 Season 1 on at
    Need information about CurrFieldNo
    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
  • gdrenteria Profile Picture
    gdrenteria 14,483 Most Valuable Professional on at

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans