- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 03:10 AM
Hi There,
I have one requirement on sysapproval_approver Table
I have one Catalog Item 'XYZ' in that , i have 2 fields and These fields should be displayed on approval page
Not on Request page or RITM those should only visible for Approval ,
So how can i achieve this, can anybody please help me to get the proper solution.
Thanks,
Priya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 11:21 PM
Hello,
The business rule will only populate the fields on approver table. To hide the fields for other items on we need a UI policy. Please do the below:-
Create a UI policy on sysapproval_approver table as below:-
Use the below condition:-
First click on Approval for-> task fields
Then select requested item[+]
Item-> Catalog item fields
Then select name is XYZ
Then in the UI policy actions below:-
Just create the record for both fields
Set the field name and set visible to true and save it
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 03:34 AM
Hello,
Are these variables if yes then you need to create two fields on the approver table then populate them using business rule and have them visible of form only if the it is ritm and the ritm item name is XYZ.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 02:55 AM
Hello,
I have created 2 fields on Approver table, now could you please help me on Business Rule.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 03:48 AM
Hello Saurav,
I have written the below BR code, but I don't think the code is in proper manner, please help me on this.
(function executeRule(current, previous /*null when async*/) {
if(sysapproval.cat_item.name == 'XYZ')
{
var sysApprover = new GlideRecord("sysapproval_approver");
sysApprover.addQuery("sysapproval", current.getValue("sys_id"));
sysApprover.query();
if (sysApprover.next()) {
current.variables.u_site_details = sysApprover.approver;
current.variables.u_network_segment = sysApprover.approver;
}}
})(current, previous);
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 04:37 AM
Hello,
Please write a after insert BR on sysapproval_approver table:-
Use the below code:-(Replace the fieldname1 and fieldname2 with your fieldnames)
(function executeRule(current, previous /*null when async*/) {
var sysApprover = new GlideRecord("sc_req_item");
sysApprover.addQuery("sys_id", current.sysapproval);
sysApprover.query();
if (sysApprover.next()) {
current.fieldname1 = sysApprover.variables.u_site_details;
current.fieldname2 = sysApprover.variables.u_network_segment;
current.update();
}
})(current, previous);
Please mark my answer as correct based on Impact.