- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2022 01:38 AM
if incident task state is one of closed complete, closed incomplete, closed skipped then form should be in read only and ative= false
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2022 05:17 AM
Hello,
Your goal is to set actuve to false and at the same time to disable all fields in the form.
Propostion to achieve this is to create a display business rule and a client script.
1- Display business rule :
2- client script :
function onLoad() {
// put the desired states :
if (g_scratchpad.active=="false" && (g_scratchpad.state =="6" || g_scratchpad.state == "7" || g_scratchpad.state == "8")) {
//Set all fields read only
for (var x = 0; x < g_form.elements.length; x++) {
g_form.setReadOnly(g_form.elements[x].fieldName, true);
}
}
}
Regards,
Hajar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2022 05:17 AM
Hello,
Your goal is to set actuve to false and at the same time to disable all fields in the form.
Propostion to achieve this is to create a display business rule and a client script.
1- Display business rule :
2- client script :
function onLoad() {
// put the desired states :
if (g_scratchpad.active=="false" && (g_scratchpad.state =="6" || g_scratchpad.state == "7" || g_scratchpad.state == "8")) {
//Set all fields read only
for (var x = 0; x < g_form.elements.length; x++) {
g_form.setReadOnly(g_form.elements[x].fieldName, true);
}
}
}
Regards,
Hajar