How to make a window Read Only at a certain status using Dynamic Window Rules

Version 11

    Verified Product Versions

    Service Desk 7.7.xService Desk 7.8.xService Desk 2016.x



    I want to make a full window Read Only for certain statuses. How can I achieve this?





    You can do this using Dynamic Window Rules.


    The below is an example in how to set certain attributes on an article to be Read Only when it's in Submitted, Approved or Rejected Status. You can change the calculation according to your own design by adding in other statuses and attributes. This can be created on any Object carrying a window.




    1. Make sure that the relevant status is set to Read/Write:

    2. Create a -1 String Attributes on the Article Object. Name it: “Calculation Read Only”

    3. On this attribute, create a Dynamic Window Calculation:


    import System
    static def GetAttributeValue(Article):
              Value = false
              if Article.Status.Title == "Approved" or Article.Status.Title == "Submitted" or Article.Status.Title == "Rejected":
                        Value = true
              return String.Format(":SetReadOnly(Title, {0});:SetReadOnly(_Description, {0});:SetReadOnly(Type, {0});", Value)


    4. Add the trigger attribute to be your Dependancy. In this case it's “Status”.

    5. Launch the Article window in Window Manager and add the “Calculation Read Only” attribute to the window. Set this to be hidden by setting “Show on Window” to False.

    6. Add the trigger attribute to the window, if this is not already on here. In this case it's "Status".

    7. Highlight the trigger attribute and go to properties. Set “Is Calculate on Change” to True.

    8. Save the Window.

    9. Do an IISReset and test your design.


    Please note to use the NAME value of the attributes and Statuses in your Calculation.