Mobile App - onload Client Scripts do not return the correct value for the g_form.getValue() APIIssue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } .spanColor { color: #646464; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } hr{ border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; } ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Mobile App - onload Client Scripts do not return the correct value for the "g_form.getValue()" API Overview In the Helsinki release, the API g_form.getValue() invoked from an on-load Client Script fails to return the expected correct value. For example, on mobile devices, navigating to Incident > Assigned to me loads the list of incidents assigned to current logged-in user. On the list, when you click the "+" symbol, the system creates a new incident record with the Assigned to field populated as the currently logged-in user. During this time, the onload client script, doesn't return the correct value for the g_form.getValue("assigned_to") API. Instead, it returns the value as "javascript:gs.user_id()". Therefore, if you are on the Helsinki release, you cannot build a customization based on the on-load and g_form.getValue() API in new records on mobile devices. Solution This issue is resolved beginning with the Istanbul release as part of other enhancements and improvements in the mobile platform. Therefore, if you upgrade to the latest release available, this issue will be automatically resolved. If you are on Helsinki, apply the workaround. Workaround You need to create a new Display business rule with the attributes listed below. In the affected on-load Client Script, use the global scratchpad variable in order to access form values, as, for example, the Assigned To user name. This enables the building of the required business logic with the expected values retrieved. ================================Table: Incident Active: True Advanced: True When to run => When: Display Query: True Advanced => Script: (function executeRule(current, previous /*null when async*/) { g_scratchpad.assignee_sys_Id = gs.user_id(); g_scratchpad.assignee_name = gs.getUserDisplayName(); })(current, previous); ================================= =================================function onLoad() { //Type appropriate comment here, and begin script below alert("Assigned to:"+g_scratchpad.assignee_name); } ==================================