• 2.1k
  • 81
  • 35.9k

Save data into sqldb using custom method into lightswitch

Oct 28 2014 10:18 AM
Hi friends,
How to save data on button click(not by using save icon given by popup screen). I tried to use custom method like below. but data is not saving in sql database. 

myapp.AddEditApplicantDeclaration.SubmitMethod_execute = funcation(scree)
msls.application.commitChanges().then(null, function fail(e) { alert(e.message); msls.application.cancelChanges(); throw e; });

I created a button and write the _execute method. but its not saving into data base. Am i missing something here.
Its a simple table and trying to update isSummitted column into "Applicant" table.