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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)
Answered

Current field of current record.

(0) ShareShare
ReportReport
Posted on by 2,390

Is there any way I can get field ID of current record which is currently active.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,223 Super User 2026 Season 1 on at

    CurrFieldNo specifies the field number of the current field

  • NavTech Profile Picture
    2,390 on at

    It is not working on Page. Does it work only on table.

  • Suggested answer
    Mohana Yadav Profile Picture
    61,223 Super User 2026 Season 1 on at

    yes, it works in tables.

    Please check whether you can move same code to a function table and call it from page

  • NavTech Profile Picture
    2,390 on at

    I made a following function in table and called it from page. All the filters are flowing good on page except "Field No.". Filter on "Field No." is always 0 . Means CurrFieldNo returning 0 evrytime.

    TestRec.RESET;

    TestRec.SETRANGE(Code,Code);

    TestRec.SETRANGE("Field Type","Field Type");

    TestRec.SETRANGE("Line No.","Line No.");

    TestRec.SETRANGE("Field No.",CurrFieldNo);

    PageTestRecList.SETTABLEVIEW(TestRec);

    PageTestRecList.LOOKUPMODE(TRUE);

    IF PageTestRecList.RUNMODAL <> ACTION::Cancel THEN;

  • Mohana Yadav Profile Picture
    61,223 Super User 2026 Season 1 on at

    Where did you call the function from page?

  • NavTech Profile Picture
    2,390 on at

    On subform .from OnAction trigger of ActionItems

  • 4BzSoftware Profile Picture
    6,073 on at

    Hi all,

    Just make a test in OnModify trigger of table, it always shows 0 :-(

    OnModify()

    MESSAGE('%1', CurrFieldNo);

  • Verified answer
    Mohana Yadav Profile Picture
    61,223 Super User 2026 Season 1 on at

    Make sure that you have written code in proper place and not in action.

    you can write in field triggers like Onvalidate etc

  • NavTech Profile Picture
    2,390 on at

    I need to simply apply filters and lookup the corresponding page .Writing code on Onvalidate trigger will not apply filters or lookup page. I have around 50 fields in table .on which field or how shall I write code on On validate Trigger.

  • 4BzSoftware Profile Picture
    6,073 on at

    Thank Mohana for your information!

    It works in field Onvalidate trigger, but it is much work to write code for each fields, totally agree with NavTech!

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans