GlideMobileExtensions.getDeviceType() intermittently does not show device type

pennieturner
Mega Guru

We are using the following code in a business rule:

GlideMobileExtensions.getDeviceType()

It shows what device type is being used, and in our BR we are setting a delivery address to be the 'requested for' if a mobile is used.

We have seen that intermittently the device type is not captured, therefore when someone on a mobile does orders something, its not setting it as 'm' therefore our code doesn't run to set the delivery address.

Has anyone come across this before?   Any advice to get it so it sets it all the time?

5 REPLIES 5

jonmulherin
Giga Expert

Hi Pennie,



I see this is from a few months ago and don't know if you and Ashley ever came up with a resolution.   Instead of using GlideMobileExtensions.getDeviceType() I added the following line to the "Build scratchpad for task" BR.   I've not had an issue where g_scratchpad.DeviceType has been blank.



if (g_scratchpad.DeviceType == 'undefined')


  g_scratchpad.DeviceType = gs.getSession().getProperty('device_type');