- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2016 01:45 AM
Hi,
I wants to show "Name of the item requested" field also in Approval page. Currently it's showing only "Request" number. But I wants to display the items as well that are requested as part of this request in Approval page. For example, If a "Computer" is requested as part of a REQ0001, I wants to show the name of the item "Computer" as well, while approving.
I know, we can add fields by Personalizing form layout. However, I am not able to find the "fields", where request items can be displayed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2016 03:30 AM
Hi Ram,
I have done a small change in the above code. Please use the below code
test();
function test()
{
var itemname='';
//gs.log("Approval For"+current.sysapproval);
var gr=new GlideRecord("sc_req_item");
gr.addQuery("request",current.sysapproval);
gr.query();
while(gr.next())
{
itemname+=(','+gr.cat_item);
// gs.log("itemname"+itemname);
}
current.u_item_name=itemname;
//gs.log("in"+current.u_item_name);
current.update();
}
This works fine if the new filed u_item_name is of type List. When you place order for multiple items this will return multiple item's name in the Approval form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2016 04:47 AM
Thank you,
My original requirement was to show/hide an existing field, based on this item. I am able to do it through a UI Policy, which called a script include.
Thanks
Rami Reddy