myapp.Calc.SkipOrder_Tap_canExecute = function (screen) {
var enabledBool = new Boolean;
screen.getOrders().then(function (result) {
enabledBool = (screen.OrderPosition < result.data.length - 1);
});
return enabledBool;
};
The SkipOrder_Tap is a button object in MS LightSwitch. The problem is, I need to return the Boolean AFTER the asynchronous call.