Issue
This article shows how to obtain the sys_id of a record by using a client script.
Resolution
You can use the g_form.getUniqueValue()
function to fetch the record's sys_id.
Related Links
Find more information in our developer documentation: GlideForm - GetUniqueValue.