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)

Filter Record

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

  I have Main Form & Sub Form . Main Form Source Table is Location & Sub Form is Sale Line Table.  I have below code to filter record according to User Id Location . It should display only 1 record according to User Location . User should not be able to select any other Location. User should not be able to select Previous , Next buttons.


IF UserSetup.GET(USERID) THEN
BEGIN
UserSetup.TESTFIELD("Store No.");
IF (UserMgt.GetUserInfo2(USERID) <> '' )THEN BEGIN
SETRANGE("No.",UserMgt.GetUserInfo2(USERID));

END;
END;

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Where is issue ???

  • jsshivalik Profile Picture
    3,099 on at

    Hi

     When i pressed Next button it displays one more record but in non-editable mode which i don't want

    Thanks

  • Amol Salvi Profile Picture
    18,698 on at

    Paste the screenshot

  • Suggested answer
    npanchal Profile Picture
    on at

    User FILTERGROUP, before and after the SETRANGE, it will resolve your issues.

  • jsshivalik Profile Picture
    3,099 on at

    Hi

      Can u pls guide how it should be written . I have written like this but not working properly


    FILTERGROUP(2);
    SETRANGE("No.",UserMgt.GetUserInfo2(USERID));
    FILTERGROUP(0);

    Thanks

  • jsshivalik Profile Picture
    3,099 on at

    7853.Screen2.jpg7853.Screen2.jpg

  • jsshivalik Profile Picture
    3,099 on at

    Hi Amol

     I have added the screenshot

    Thanks

  • npanchal Profile Picture
    on at

    Which trigger are you putting your code?

  • jsshivalik Profile Picture
    3,099 on at

    Hi

    Form - OnInit()

    Thanks

  • npanchal Profile Picture
    on at

    Put it on Open Page.

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