LABKEY.Query.insertRows call onSuccess when not actually successful | Ben Bimber | 2010-06-08 14:07 |
Status: Closed | ||
i was using the following. i originally used 'id' instead of 'employeeId' for my field name. correcting this fixed the problem and caused records to insert correctly. even with the incorrect name, the success function was still being called. it's a regular labkey list. LABKEY.Query.insertRows({ containerPath: '/WNPRC/WNPRC_Units/Animal_Services/Compliance_Training/Private/EmployeeDB', schemaName: 'lists', queryName: 'CompletionDates', scope: this, rowDataArray: [{ RequirementName: 'SOP Review' ,EmployeeId: LABKEY.Security.currentUser.displayName ,Date: new Date().format("Y-m-d") }], successCallback: function(){ alert('Thank You for Reading Your SOPs. You have now completed your SOP requirements for the year.'); var url = LABKEY.ActionURL.buildURL( 'Project', 'begin.view', 'home' ); window.location = url }, failureCallback: function(errorInfo) { Ext.Msg.alert("Error:", errorInfo); } }); } |
||