pui.submitResponse( post data )
This API is synonymous to the pui.submit() API.
Example:
The following demonstrates how to synchronize offline mobile order data with the server. Â It can be attached to the onload event of an order entry screen.
function sync() {
var orders = localStorage["orders"];
if (orders == null || orders == "") return;
else orders = JSON.parse(orders);
if (orders.length == 0) return;
var order = orders.splice(0,1)[0];
pui.submitResponse(order);
localStorage["orders"] = JSON.stringify(orders);
if (orders.length == 0) {
alert("Locally stored orders successfully submitted to server.");
}
}
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!