function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alexander Charles GilfellonAlexander Charles Gilfellon 

Unable to update a record in Salesforce 1 mobile app and mobile web browser using javascript.

In my instance, on a contact record, I have included a visual force component which has a button and the javascript code. Upon clicking on the button, the javascript methods are called and fields are updated on the record detail page as soon as the page reloads. This functionality is working perfectly on my computer (safesforce classic), but when I try the same from a mobile web browser or salesforce 1, the update operation is not working. I have put an alert after the update operation to verify this. The following is the update and refresh command I have used along with the alert in the middle.  
sforce.connection.update([c]); // update operation happening here
alert('Final Updated Record'+c.Id); // alert operation
window.top.location.href='/'+c.Id; //full page is refreshed to reflect the updated fields in the record detail page
Also is it possible to find out if a user is accessing the record from a mobile device? I think that might come in handy if the update operation code is different for a mobile device.

Thanks in advance.