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

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
    60,999 Super User 2025 Season 2 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
    60,999 Super User 2025 Season 2 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
    60,999 Super User 2025 Season 2 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
    60,999 Super User 2025 Season 2 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

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans