how to hide fields in a form for particular user

aliasghar
aliasghar Member Posts: 27
hi,
how u will hide some fields form purchase line form in a purchase order for a particular user.
Ali Asghar

Comments

  • Miklos_Hollender
    Miklos_Hollender Member Posts: 1,629
    1) Disabling zoom from User Roles/Permissions.
    2) Writing code to OnOpenForm or OnAfterGetRecord that plays around with the CurrForm.whatevercontrol.Visible(FALSE), you can also try ENABLED. Probably base it on a new field on User Setup.
    3) Figuring out which reports show this field (f.e. with Developer's Toolkit and the Where-Used feature).

    But. This isn't really a good way to go. First, Navision has a generally very liberal philosophy (like Denmark in general), it's typically for those open-minded companies where everybody can walk into the owner's office and ask how much is this months margins. Implementing it for a company where the managers are making a big fuss about hiding information from employees is dangerous, i.e. you might end up putting 40-60 days of development into hiding things and then always tweaking it if somebody is on holiday or on the whim of the managers etc. It would be the best to convince them to drop it.

    But. If you can agree with the managers that they won't make hiding stuff into a general policy, but there is only one specific thing they want to hide, then you can just save that form (along with subforms) to a different number and name and remove the field(s). Disabling Zooming is also necesary. In this case the question is how to associate the forms with users. You could do it via the permissions but in this case you have to assing permissions to each form one by one. You can just do it via them MenuSuite from 4.0 up. Or a new field in User Setup and code in OnOpenForm that throws an ERROR...
  • zeninoleg
    zeninoleg Member Posts: 236
    I agree with Miklos about Navision "open minded" phylosophy. We have the same problem with hiding the fields and we got the Lanham addon that does a pretty good job in hiding columns in the list forms and fields in the card forms
    Best Regards,
    Oleg
  • Mbad
    Mbad Member Posts: 344
    2) Writing code to OnOpenForm or OnAfterGetRecord that plays around with the CurrForm.whatevercontrol.Visible(FALSE), you can also try ENABLED. Probably base it on a new field on User Setup.

    Cant users just click them back on from the view colums? Dont think you can hide single fields from dynamic settings.
  • ssingla
    ssingla Member Posts: 2,973
    It is a question of hiding the rate and the amount on purchase order from the users in the warehouse.
    CA Sandeep Singla
    http://ssdynamics.co.in
  • David_Singleton
    David_Singleton Member Posts: 5,479
    Mbad wrote:
    ...
    Cant users just click them back on from the view colums? Dont think you can hide single fields from dynamic settings.

    Yeah you can, you just need to play around a bit to make it work.
    David Singleton
  • themave
    themave Member Posts: 1,058
    Not the best solution, but the least amount of coding I believe, (since I am an end user, and can only do a limited amount of coding)

    we modify the original forms to have the least amount of info needed, and make this the default. By using the original form, you assure when users navigate through Navision they get this form.

    Then for the users that need more info, we have a separate menu for them and design a second set of forms for them. We assign users to menus depending on which forms they should use.

    If you do it the opposite way and make a new restricted form for the warehouse users leaving the original for the other users, someone will navigate from a document somewhere in Navision and the navigation will bring them to the un-restricted form.

    Without purchases and add-on, it is very tough to do using permissions other security, we found the restricted forms is the most effective.