Question & Answer
Question
How can a field be set as readonly when a user is updating a SR?
Answer
In the following example, the SR SITEID will be set as READONLY on all existing SR's.
1) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action – Create – Scripting with Attribute Launch Point:
2) Within the 'Create Script with Attribute Launch Point : Step 1 of 3' add the following:
Launch Point: SITEIDREADONLY
Description: SITEID Read Only on REPORTEDBYID update
Active: CHECKED
Object: SR
Attribute: REPORTEDBYID
Click on the 'Next' button.
3) Within the 'Create Script with Attribute Launch Point : Step 2 of 3' add the following:
Script: SITEIDREADONLY
Description: SITEID Read Only on REPORTEDBYID update
Script Language: jython
4) Within the Variables pane, click on New Row. Add the following:
Variable: siteid
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: siteid
5) Click on Next button. Within the 'Create Script with Attribute Launch Point : Step 3 of 3' add the following script:
if onupdate == True:
siteid_readonly = True
Click on the Create button. Correct any error that may appear. The following dialog will be displayed:
6) Access an existing SR and update a field, the SITEID will now be READONLY:
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21648371