How to get user's browser and operating system from record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 05:48 PM
Hi: In a record producer for incident, I need to record the user's browser and operating system. Can I look that up in the business rule? Any idea how? Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 07:54 PM
I wonder if you would be better off grabbing the browser type and version through Javascript (via Client Script).
However, that said, the following will give you the browser version and type through a Business Rule as you asked:
gs.log("Browser " + gs.getSession().getProperty('user_agent_browser')); |
gs.log("Version " + gs.getSession().getProperty('user_agent_version'));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 08:00 PM
Hi: Unfortunately that didn't work. Can you please advise on the client script code? Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 08:06 PM
You can use the navigator. in your client script:
This example shows you some of the attributes you can access.
I have tested this in a client script and it works fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 10:20 PM
Hi Rita,
you need to create script include and call it that function in catalog client script through glide ajax.
i tested it and it is working on record producer.
Please find the script below.
Catalog Client Script:
function onLoad() {
//Type appropriate comment here, and begin script below
var check = new GlideAjax('global.details');
check.addParam('sysparm_name', 'bdetails');
check.getXML(analyzeResponse);
function analyzeResponse(response)
{
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
g_form.setValue('details',answer); // i set the details in one of the variable on record producer.
}
}
Script Include:
var details = Class.create();
details.prototype = Object.extendsObject(AbstractAjaxProcessor, {
bdetails: function()
{
var checkbrowser=gs.getSession().getProperty('user_agent_browser');
var checkversion=gs.getSession().getProperty('user_agent_version');
var details=checkbrowser+' '+checkversion;
gs.log('will it work:'+details);
return details;
},
type: 'details'
});
I tested and it is working
Final Output
Please check the thread below.
Capture browser and basic OS information
Thanks,
Harshvardhan