I need to write an onLoad() client script on a table in order to :

sonita
Giga Guru

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.

7 REPLIES 7

Hi Soni,



This code wont work since it does not queries the table using the object rp which you have initialized. Also, making GlideRecord calls from client end to server is prohibited, better ways are getReference() with call back, much better way to user GlideAjax and best way to go for g_scratchpad using Display Business rule if possible.



Now, talking about the relationship, can you open the status report record and check if there is any reference field pointing towards "resource plan" table?


If not, then check other way around by opening the "resource plan" table and check for a reference field pointing towards "status report" record.


you mean having something like this?



var rp=g_form.getReference('resource_plan');



and no there is no reference field to resource plan on the status report record.



find_real_file.png


planned hours and actual hours are string type. maybe i can change them??


How both tables are related to each other? You have still not provided the connecting link between two tables as asked by Mani already.