How to Differentiate Between Inquiry and Maintenance Panel in Script

SOLVED

I'm writing a script to expose or hide selected controls based on user.  I would like the script to be operational ONLY in Maintenance mode, not Inquiry.  In the script, how do I identify whether the panel is in Maintenance or Inquiry mode?

Parents Reply Children
  • 0 in reply to Kevin M

    Bingo.  That did it!  Thanks

  • +1 in reply to ehx
    verified answer

    Another method is checking the oSession.AsObject(oSession.Security).TaskType property.

    However both TaskType and StartProgram can be misleading if a user has a role where only "View" is checked for something like Item Maintenance.

    The surest way to tell whether or not a user can edit, create, or delete records is by checking the oBusObj.SecurityAccess property.

    • 0 equals View only.
    • 2 equals Modify with View implied.
    • 3 equals Create with View and Modify implied.
    • 4 equals Remove with View implied.
    • 6 equals Modify and Remove with View implied.
    • 7 equals Create, Modify, and Remove with View implied.
  • 0 in reply to David Speck

    Thanks for this additional information.  oSession.StartProgramName did the job for me in the script I was working on at the time but this more detailed information will come in handy in future customizations.  Thanx!