There's a new home for Articles. Find Articles on Our Product Support Page.
Hello SOTI team, I am developing an app with SOTI-SNAP wherein I use javascript to use a AspNetCore REST service from our server located on the internet.When developing I use the preview function of SOTI-Snap in the browser (Chrome). Calls with the GET method works from preview. But the POST method returns the following error in the browser console: Access to XMLHttpRequest at 'https://[OurServer].com/soticlean/TimeRecords' from origin 'https://s3.eu-central-1.amazonaws.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. Here my Javascript call from my app: var settings = { "url": Snap.variables.getValue("gvarServiceURL"), "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" }, "data": JSON.stringify( { "deviceUid": data.deviceUid, "date": data.date }), }; return $.ajax(settings).done(function (response) { console.log(JSON.stringify(response)); alert(JSON.stringify(response)); }).fail(function (response) { alert(JSON.stringify(response)); }); } And here the customHeader section from my Web.config of my AspNetCore REST Service: ... <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="https://s3.eu-central-1.amazonaws.com" /> <add name="Access-Control-Allow-Headers" value="Content-Type"/> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /> </customHeaders> </httpProtocol> .... I hope someone can help me. Thanks a lot Martin
Hi, I have a submit button whose processing of its click event I want to interrupt with javascript, on a certain condition. How can I do this? event.preventDefault(); does not work. Thanks a lotMartin
Hello. In my javascript on the OnLoad event is this one line of javascript code. document.getElementById("TrailerID").focus(); Doesn't work worth peanuts. I only have one textfield named TrailerID on my form. Any ideas?
Is there a way to set which value is selected with a java script?
In setting a max date for the datepicker named “datFueling”. Below are the two attempts that I have made, neither seems to work. The id of the datePicker control is "datFueling". _________________________ var today = new Date(); document.getElementById("datFueling").maxDate = today; _________________________ _________________________ var today = new Date(); $("#datFueling" ).datepicker( "option", "maxDate", today); _________________________ Any ideas?
Is there an easy way to deploy SOTI Snap apps in a Mobicontrol instance? We have about 400 android devices and i would think it would be available so that we wouldn't have to enter the enrollment ID for each unit. Thanks in advance, Terry
Hi, I would like to know how can I include barcode widget value to the data export. I use my own rest service and I know how to map textbox value and it works well. Barcode widget is not even available in the mapping list. Also I wonder why event is not available and parse feature missing from the barcode widget. -Pasi
Hello, The barcode widget doesn't have the events tab enable. How can I use the barcode to search items in a list, for example? Thank you
Hello In Soti Snap you can set a visibility rule for the widgets, but I have not been able to delete these rules. Once they are configured, it is not possible to delete them. You have to delete the widget and start again. I appreciate if you can help me with this issue
I'm trying to enroll a device, and I get this error, but I am the admin of my SOTI Snap instance, and I don't know what this means or what to do about it.
Hi, I would like to do the following: Have a Label with a number say 10 Have a text box with user entry numeric only 0-10 Have another text box with user entry numeric only which equals the label value minus the text box value i.e. 10 - 5 = 5 Seems a pretty straightforward feature but I can't figure out how to do it? Any help would be appreciated. Thanks Mat
Is it possible to get/put Data from SQL Server Database?
Hi All, Hopefully this is a really easy one and I am missing something really simple. We have just got Soti Snap and I an trying to build a timesheet app. I can insert a date picker field, but I cannot find a way of inserting a time picker field. I am hoping to export data to google sheets and automate the wage calculation in there, but without a time picker it is difficult as the employye can enter time data in text box questions in a variety of formats. Many thanks in advance.
When I attempt to get the records/entries for one of my apps via the API I'm getting a 404 response code back along with "{ "message" :"Data not found"}" in the body of the response. However, I can see in the report page for my app that I should have two entries. All of the other API endpoints are working for me. Here is my URL: https://developer.snap.soti.net/api/v1/apps/0/appversions/9ad8d178-cecc-8e0a-4e08-39e2c918c536/entries/ What am I doing wrong?
Top-tier experts who are delivering outstanding content. Should have more than 7000 points.
Experts who are consistent with great content. Should have more than 1000 points
Highly experienced members with valuable inputs. Should have more than 700 points
Beginners taking the initiative. Should have more than 500 points