How to hide unit costs

jfreyjfrey Member Posts: 43
Hello
Is it possible to hide the unit cost for sales people? Sales people should never see the unit cost of a item.
Thanks for any help
Jörg

Navision 3.7
Navision 3.70, SQL Server 2000, Citrix Metaframe

Comments

  • Timo_LässerTimo_Lässer Member Posts: 481
    First of all, you must disallow the Zoom [Ctrl+F8].

    The easiest way is to remove the field from the card.

    Another way could be:
    • Put a new field in the User Setup Table (e. g. "Hide Unit Cost")
    • OnOpenForm()
      UserSetup.GET(USERID);
      CurrForm."Unit Cost".VISIBLE := NOT UserSetup."Hide Unit Cost";
      
    • The user could now show this field via the menu, therefore you put the same code also in the
      OnActivate()
      CurrForm."Unit Cost".VISIBLE := NOT UserSetup."Hide Unit Cost";
      

    The 3rd solution is to substitute the value shown on the card.
    Therefore you also need the new field in the User Setup.
    OnOpenForm()
    UserSetup.GET(USERID);
    
    Unit Cost - OnFormat()
    IF UserSetup."Hide Unit Cost" THEN
      Text := '******';
    
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • ShenpenShenpen Member Posts: 386
    Timo's answer is very good, but I'd like to add, that then you cannot use standard Roles. Standard Roles allow access to all forms, reports etc. and only hide Table Data (records). So if you need to do that, you also have to painfully set user rights to forms, reports etc...

    Do It Yourself is they key. Standard code might work - your code surely works.
  • jfreyjfrey Member Posts: 43
    Disable zoom or remove is not enough. On the item number you can go to the card, so you have to disallow also that.
    I think, the only way is, to make several new forms only for salespeople.

    Jörg
    Navision 3.70, SQL Server 2000, Citrix Metaframe
  • PhennoPhenno Member Posts: 630
    jfrey wrote:
    Disable zoom or remove is not enough. On the item number you can go to the card, so you have to disallow also that.
    I think, the only way is, to make several new forms only for salespeople.

    Jörg


    Few questions. How can I remove Zoom?
    I have some data that must not be visible for a lot of people but few of them.

    And, they have request to see that data both Item Card and Item List.
    First problem is a Card that with zoom, everybody can see.
    Another problem is List. In a list I can switch to not visible, pa user can simply right click and make it visible.

    i can put it as a pass-text but, do copy/paste tu wherever and data is there.
    and the biggiest problem. It can always be filtered through ctrl+F7 and than, by that filter, user can guess values.

    So... I need hidden field for someone but visible on card and list for other.
    And, the field must be real field that can be filtered when appropriate (when user is eligible to do that).
  • Timo_LässerTimo_Lässer Member Posts: 481
    You can disable the Zoom by removing the permission on "System 5330".

    If you use my code, the user can show the field as often as he wants. Every time he come back to the list form, the code in the OnActivate-Trigger will hide the column ;-)
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • KowaKowa Member Posts: 925
    Phenno wrote:
    How can I remove Zoom?

    Individual form zoom and user right role :
    http://www.mibuso.com/forum/viewtopic.p ... highlight=
    Kai Kowalewski
  • PhennoPhenno Member Posts: 630
    Kowa wrote:
    Phenno wrote:
    How can I remove Zoom?

    Individual form zoom and user right role :
    http://www.mibuso.com/forum/viewtopic.p ... highlight=

    tnx people.
  • dsatriadsatria Member Posts: 80
    You can disable the Zoom by removing the permission on "System 5330".

    If you use my code, the user can show the field as often as he wants. Every time he come back to the list form, the code in the OnActivate-Trigger will hide the column ;-)

    I tried your code (our navision is version 4.0) but after user close Show/Hide Column dialog he still has chance to copy and paste data (complete with the sholud-be-hidden column) before he move the cursor and lost the column. Is there a way to prevent this?
  • mark_christsmark_christs Member Posts: 156
    :lol::lol:
    The question is posted on May 30, 2005. but new reply/question is posted almost a year from the posted. I am sorry but I don't understand why this new question is posted right now. :lol::lol:
    Could it be answered ? :?:



    Rgds,
    Mark
  • themavethemave Member Posts: 1,058
    There is an add-on that will allow you to do that

    http://www.costcontrolsoftware.com/F_C_Security.htm

    Landham also has one that will do this for you, probably cheaper to buy the add-on then try to figure out every way a user can navisgate to a field, because you will always miss one
  • dsatriadsatria Member Posts: 80
    :lol::lol:
    The question is posted on May 30, 2005. but new reply/question is posted almost a year from the posted. I am sorry but I don't understand why this new question is posted right now. :lol::lol:
    Could it be answered ? :?:



    Rgds,
    Mark
    Why not? I just found the thread today :)
  • themavethemave Member Posts: 1,058
    :lol::lol:
    The question is posted on May 30, 2005. but new reply/question is posted almost a year from the posted. I am sorry but I don't understand why this new question is posted right now. :lol::lol:
    Could it be answered ? :?:

    Rgds,
    Mark

    We are supposed to search first, so if we search and find something close, is it not appropriate to try to continue the thread. Otherwise someone else will do the search and post the link to this old post and ask why we didn't search first.
Sign In or Register to comment.