- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 01:04 PM
Version Helsinki.
I have a request from my users to enable them to enter as many affected CIs at the beginning of data entry for a Change. As it is now they enter one CI when initially entering a Change. They then have to go back into that change to enter multiple Affected CIs in the Related Links section, where the tabs display. Doing all the affected CI entry at the beginning would save some time.
So I went into the Form Layout of the Change and moved Affected CIs from the left column to the right column to move it onto the Change entry form.
While this allows them to do what they want here comes the trick. It allows them to add Affected CIs at any stage of the Change. How do I turn off the Add function after a specified stage? It works now such that after New the Edit button is turned off but I can't find where that functionality is nor do I understand if it works for one scenario why it doesn't work for the other. I can include screen prints if it might help. Will keep looking.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 07:44 AM
The "insert a new row" is based on the user's permissions on that table via ACL's. So you can modify the create ACL for the task_ci table to accomplish this. I ran a quick test and it worked based on changing the state:
Here is the example script I used:
var answer = true;
if (!gs.nil(current.task)) {
if (current.task.sys_class_name == "change_request" && current.task.state != 1) {
answer = false;
}
}
answer;
Make sure you pay attention if there are multiple create ACL's on this table as you may need to update several ACL's to get this to work.
Please mark this or any post helpful or the correct answer to your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 08:09 AM
I tried your code putting in -5 instead of 1 because -5 represents the value for our new and it didn't work. I could still add a record on a change that has progressed beyond New. So then I changed my code to below thinking maybe it wasn't change_request (just trying things) and it too didn't work. So I'm missing something somewhere. I do have only one Create ACL on the task_ci table. I also have a Read, Write and Delete. So when you tried it your Insert a new row would disappear?
var answer = true;
if (!gs.nil(current.task)) {
if (current.task.sys_class_name == "Change Request" && current.task.state != -5) {
answer = false;
}
}
answer;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 08:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2016 06:12 AM
I guess I was doing something wrong. I went back and reviewed everything you sent, tweaked one item, and it works great. Thanks.