Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Hide

(0) ShareShare
ReportReport
Posted on by 3,027

Hi

   How to Hide a Field on Request Page in Report. On the basis of condition in User Setup i want to show Hide & Display field.

 

On Openpage i have written this



IF UserSetup.GET(USERID) THEN BEGIN
  IF (UserSetup."Role" <> 'Admin') THEN BEGIN
      IsVisible = FALSE;
  END;
END;

 

Thanks

 

*This post is locked for comments

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Hide

    IF UserSetup.GET(USERID) THEN BEGIN

     IsVisible = (UserSetup."Role" = 'Admin');

    Did you add IsVisible variable in Visible Property of Control that you want to Hide?

    which scenario is not working?

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Hide

    Hi

      Role is a custom field. Above code is not working i am unable to Hide field. How to use it correctly.

    Thanks

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Hide

    it's correct to write the above code in the "OnOpenPage",   but is the InVisible variable being set in the Visible property of the control?

    Is the "Role" field in the User Setup customized?  If the field data type is Code, the condition has to be

    IF UserSetup.Role <> 'ADMIN' THEN

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans