Created
September 5, 2012 20:50
-
-
Save sbob-sfdc/3644520 to your computer and use it in GitHub Desktop.
Workshop 302, Tutorial 3, Step 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handle clicks to Update on detailpage | |
$j("#updateButton").click(function() { | |
// update local information in the inventory array | |
inventory[$j("#detailpage").attr("data-id")].Quantity__c = $j("#quantity").val(); | |
currentRecord = inventory[$j("#detailpage").attr("data-id")]; | |
// strip out ID before updating the database | |
var data = new Object(); | |
data.Quantity__c = currentRecord.Quantity__c; | |
// update the database | |
forcetkClient.update("Merchandise__c",currentRecord.Id,data,updateSuccess,onErrorSfdc); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment