is it possible to check if a record is being viewe...
# suitescript
m
is it possible to check if a record is being viewed in a mobile phone device? we want to view a stripped-down version of a case record
b
if you are doing this serverside in a user event beforeLoad or suitelet
then your only choice might be user agent sniffing on context.request (in context.request.parameters['User-Agent']
you might consider using a library like https://www.npmjs.com/package/ismobilejs
might require browserify or at least minor source modification to work in NetSuite since the browser version of the library uses a browser global
m
thanks, i'll see what this gives me: context.request (in context.request.parameters['User-Agent']
btw - i was able to get the device from the login audit trail record by doing a saved search. the user-agent was the field. i get Cannot read property "User-Agent" from undefined from your code snippet