- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 02:49 AM
Hello Guys,
I am afraid I got lost in getReference. I need to set automatically filled field in RITM/Sctask with user ID (from user record requested_for person). I created client script on Change. But still this field is empty. My autofilling thing didnt work. Could you please show me where is my mistake?
Thank you so much in advance 🙂
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 02:54 AM
Hi @FotinaG ,
Please try below mentioned code
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('requested_for', function(userObj) {
if (userObj) {
g_form.setValue('username', userObj.user_name); // Adjust this field name
}
});
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Arun Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 02:54 AM
Hi @FotinaG ,
Please try below mentioned code
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.getReference('requested_for', function(userObj) {
if (userObj) {
g_form.setValue('username', userObj.user_name); // Adjust this field name
}
});
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Arun Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 01:45 AM
Thank you so much! Sorry for late reply!