Sage 100

 View Only
  • 1.  Is there a way to block someone a user from a tabl

    Posted 05-21-2012 19:05
    Is there a way to block someone a user from a table in Custom Office UDT Maintenance w/o blocking them from modifying it with scripting? It appears that the reverse is possible, but I don't want the user updating the table but through scripting. I suppose I could write a script to prevent this, but it seems there should be another way.


  • 2.  RE: Is there a way to block someone a user from a tabl

    Posted 05-21-2012 19:45
    You could always add a script to the UDT itself and check for the oSession.StartProgram and oSession.UserCode. Just a thought as I haven't tried it myself.


  • 3.  RE: Is there a way to block someone a user from a tabl

    Posted 05-21-2012 20:10
    I just tried this. I set a script on the Pre-Write and Pre-Delete. When the user tries to save or delete a record, this script fires: retVal = 0 if oSession.StartProgram = ""CM_UDFMAINT_UI"" and oSession.UserCode = ""OCS"" then retVal = oScript.SetError(""User not allowed to write/delete records."") end if The test for the UserCode can be removed if no one should be able to update the table through the maintenance.


  • 4.  RE: Is there a way to block someone a user from a tabl

    Posted 05-21-2012 20:17
    Oops, just noticed you mentioning ""I suppose I could write a script to prevent this""...


  • 5.  RE: Is there a way to block someone a user from a tabl

    Posted 05-22-2012 00:48
    Just a thought - what about: * In UDF Maint select your UDT then ""Add UDT to Desktop"" * Role Maintenance / Custom Office / Misc Tasks: -- Uncheck User Defined Field and Table Maintenance -- Check the box for your [UDT] -- Run SY_MENU_UI / Custom Office / UDT Maint / uncheck your UDT Your existing script should still work because CM_UDTMaint_Bus is still accessible while the 2 UI based ways of maintaining the UDT are inaccessible (with exception for DFDM and similar).


  • 6.  RE: Is there a way to block someone a user from a tabl

    Posted 05-22-2012 00:59
    I'll try that. You're building credit with me...