I need to write an onLoad() client script on a table in order to :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2016 08:56 AM
I have a status report table ; I have two fields , one called planned hours, the other one is actual hours. There is another table called resource plan table. it halso has these fileds
when I open the status report table. What I'm trying to do is to write an onLoad() client script on the status report table so when I open a record , the fileds in the status report are filled from the values from resource_plan table. Any help would be appreciated.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2016 09:14 AM
Soni,
Is there any field which represents the link between the two tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2016 10:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2016 09:20 AM
Adding to what Mani has already asked you to provide, I think your requirement can be met with GlideAjax calls or Display Business rule.
Scripting in Business Rules - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2016 10:23 AM
This is my code so far:
function onLoad()
{
var rp=new GlideRecord('resource_plan');
g_form.setValue("u_planned_hrs", rp.planned_hours);
g_form.setValue("u_actual_hrs", rp.actual_hours);
}