How to auto populate User id in a reference field in scoped apps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 01:56 PM
Hi All ,
I need help with situation explained below .
i am working in a scoped app called 'Lab client' ,on lab form i created a reference field 'Recorded By' which reference to sys_user table .
i am trying to auto populate it with logged in user id . for this i used " javascript:gs.getUserID() " in atrributes , it didn't work . used it in default value too , it didn't work .
i changed the default value or attribute to "gs.info(gs.getUserID());" , didn't work .
info about current functionality :
as shown below , visit notes is the field .
when user types something in this field , then two fields appear above Recorded by and spoke date as shown
when user selects a user in recorded by field and selects a date in spoke date and type something in the visit notes , then all data from these three fields are recorded in a 'Activities' journal notes below it and these three fields are emptied . so user can enter multiple meetings .
Questions :
1)as you see in above image , for 'recorded by' field i am selecting the user id but in the visit notes field it is being saved as sys id and same is stored in , how do i fix this issue ?
2)can i auto populate the recorded By field with logged in user id ? since there is a client script in the backend to make it mandatory , set display to false if visit notes is empty and to clear the value .
( my doubt is even thought we set it with logged in user id ,but the line of code from below screen shot g_form.clearvalue('u_reocrded_by'); will clear the value i guess )
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2019 07:07 AM
Tried this too . No luck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 09:55 PM
Hi,
Go The Reference Specification and refer to another table and otherwise set the default value in custom field.
Thanq
Thanks,
Rahul Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2019 07:06 AM
Yeah , tried already , no luck