UI Action setting priority
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2023 05:32 AM
setting UI action in which we need to create the button to set priority to critical and once its set then button needs to disappear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2023 06:25 AM - edited ‎10-01-2023 06:49 AM
Hi @Ag2106 ,
Create new ui action on incident table and
Condition :current.priority!= 1
Client checkbox:uncheck
Form Button:check
In server side script :
current.impact = 1;
current.urgency = 1;
current.update();
action.setRedirectURL(current);
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2023 06:27 AM
Hi @Ag2106 ,
Assuming you want to create a UI action on Incident table you can refer below.
Please mark my answer helpful & accepted if it helps you resolve your query.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2023 07:11 AM
Hi @Ag2106 ,
In order to achieve this you can create a UI action on the incident table as below:
Active: True
show insert : True
show update : True
condition: current.priority != 1
script :
//Setting Impact & urgency to 1 as per the Priority lookup Rules so that Urgency = [1-High]
current.impact = 1;
current.urgency = 1;
current.update();
current.setRedirectURL(current);
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2023 10:46 AM
Hi @Ag2106 ,
Hope you are doing great.
- Navigate to System Definition > UI Actions.
- Click on New to create a new UI Action.
- Provide a name for the action, e.g., "Set Priority to Critical."
- Choose the table where you want this action to be available, e.g., "Incident" for managing IT assets.
- Set the Action name to something like "setPriorityToCritical."
- In the Script field, add the code to set the priority to critical and hide the button.
// Update the priority to critical
current.priority = 1; // 1 corresponds to Critical priority
// Hide the button after setting the priority
this.setVisible(false);
Regards,
Riya Verma