
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2017 11:46 AM
Hello folks ,
I have a field name called "user" this field is referenced to "sys_user" table . Now i would like to write a client script to setValue default logged user name in this field .
Is there any way to set the value by using client scripts ? Because when i try to write below script is hitting error .
function onLoad() {
var uval = g_form.getValue('req_by_for_requested_by') ;
if (uval == '')
{
var user = ga.addQuery('user_name',gs.getUserName());
g_form.setValue(user) ;
//alert(uval);
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2017 12:01 PM
- function onLoad() {
- var uval = g_form.getValue('req_by_for_requested_by') ;
- if (uval == '')
- {
- g_form.setValue('user',g_user.userID) ;
- //alert(uval);
- }
- }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 10:33 PM
- Use this script:
function onLoad() {
g_form.setValue('user', g_user.userID) ;
}