Can a end user (no ITIL access) update the variables after submission on the portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2023 02:34 PM
Hello everyone,
I have a requirement for several catalog item variables to be completed by the end user after the request is submitted. I've tried making the variables mandatory with a client script and I gave the user a new role. However, the user can only edit the variables in the platform no matter what I attempt and not the portal. Below is the catalog client script I tried. Has anyone accomplished this or is there an easier way to achieve this?
thanks in advance for any feedback you can provide.
function onChange() {
//Type appropriate comment here, and begin script below
var ritmState = g_form.getValue('state');
if (ritmState === '9') {
g_form.setMandatory('test5', true);
//g_form.setDisplay('assigned_to', true);
}
if (g_user.hasRoleExactly("pmsubmitter")) {
g_form.setMandatory('test5', true);
//g_form.setDisplay('assigned_to', true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2023 12:58 AM - edited ‎09-14-2023 01:01 AM
This poses a series of problems to solve before you can accomplish what you are looking for.
For starters, there might be multiple RITM's under each REQ. And there will be multiple questions under each RITM.
Then there are different types of questions for each RITM.
You will need to create a custom widget to display and be able to edit all the answers.
I have provided a sample widget which can be placed under "order_status" page to display all the questions related to the RITM's under the REQ as text fields. I have not included the updating part)
Tables involved in this
sc_req_item
sc_item_option_mtom
sc_item_option
In case of record producers, you can find the questions and answers under the table question_answer.
----------------------------------------------------------------------------------------------------------------------------
Please mark the answer as helpful
And if you have a remote job for me, please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2023 07:09 AM
Thank you @ahmedkhan for all the feedback. Below is a summary of what I did to achieve this. Will you review this and provide your feedback if you feel this is a best practice or if you feel there may be issues down the road from this? Thanks so much for all your expertise.
Requirement:
End user without itil role submits catalog item and only completes order guide variables
Manager selects yes at variable "additional information" if they need user to complete more information
End user completes additional variables on catalog item, on portal that are required.
Steps I completed:
Created Catalog UI Policy
when to apply: additional_information is yes
Applies on Catalog Item View, Requested Items, Onload and rever if false
Script:
execute if true