GlideRecord is a SERVER-SIDE API. It is not available in Client Scripts. To access server data from a client script, use GlideAjax to call a Script Include. Client Scripts run in the user's browser.