• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1432
  • Last Modified:

Programatically disable "Automatically enable Edit Mode"

When a field ARCHIVE_STATUS = "ARCHIVED"  I need to change the form to READ only mode.

How can I do it?
0
Zopilote
Asked:
Zopilote
  • 2
2 Solutions
 
qwaleteeCommented:
In the form's QueryOpen:
If Source.Document.ARCHIVE_STATUS(0) = "ARCHIVED" And Mode Then continue = False

In the form's QueryModeChange:
If Source.Document.ARCHIVE_STATUS(0) = "ARCHIVED" And Not Source.EditMode Then continue = False
0
 
ZopiloteAuthor Commented:
thank you qwletee, unfortunately it doesn't work when the form has checked "Automatically enable Edit Mode" which is what my client want.
0
 
Andrew_M_BrewCommented:
In the PostOpen:
If Source.Document.ARCHIVE_STATUS(0) = "ARCHIVED" then Source.EditMode = false
... instead of the QueryOpen code posted by qwaletee.

Keep the same QueryModeChange code.
0
 
ZopiloteAuthor Commented:
Thanks! that worked
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now