|
| 1 | +<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check"> |
| 2 | + <scan_table_check action="INSERT_OR_UPDATE"> |
| 3 | + <active>true</active> |
| 4 | + <advanced>false</advanced> |
| 5 | + <category>performance</category> |
| 6 | + <conditions table="sys_script_client">scriptLIKEGlideRecord^EQ<item endquery="false" field="script" goto="false" newquery="false" operator="LIKE" or="false" value="GlideRecord"/> |
| 7 | + <item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/> |
| 8 | + </conditions> |
| 9 | + <description>Client script should be using GlideAjax if you need to make asyc calls to Server to get data from Server. GlideRecord() API shouldn't be used to avoid performance issues.</description> |
| 10 | + <documentation_url/> |
| 11 | + <finding_type>scan_finding</finding_type> |
| 12 | + <name>GlideRecord API in client script</name> |
| 13 | + <priority>2</priority> |
| 14 | + <resolution_details>Client scripts run on browser and they uses either data available on the form or data retrieved from the database. |
| 15 | +Use client data as much as possible to eliminate the need for time-consuming server lookups i.e. GlideRecord. |
| 16 | +The best ways to get data into form/browser from the database are g_scratchpad, and asynchronous GlideAjax lookup</resolution_details> |
| 17 | + <run_condition/> |
| 18 | + <score_max>100</score_max> |
| 19 | + <score_min>0</score_min> |
| 20 | + <score_scale>1</score_scale> |
| 21 | + <script><![CDATA[(function (engine) { |
| 22 | +
|
| 23 | + // Add your code here |
| 24 | +
|
| 25 | +})(engine);]]></script> |
| 26 | + <short_description>Client script with GlideRecord API calls</short_description> |
| 27 | + <sys_class_name>scan_table_check</sys_class_name> |
| 28 | + <sys_created_by>admin</sys_created_by> |
| 29 | + <sys_created_on>2022-09-30 21:33:04</sys_created_on> |
| 30 | + <sys_id>ba0c998d875251106b0f20af8bbb3515</sys_id> |
| 31 | + <sys_name>GlideRecord API in client script</sys_name> |
| 32 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 33 | + <sys_policy/> |
| 34 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 35 | + <sys_update_name>scan_table_check_ba0c998d875251106b0f20af8bbb3515</sys_update_name> |
| 36 | + <table>sys_script_client</table> |
| 37 | + <use_manifest>false</use_manifest> |
| 38 | + </scan_table_check> |
| 39 | +</record_update> |
0 commit comments