Skip to content

Instantly share code, notes, and snippets.

@mwelburn
Created May 5, 2014 22:28
Show Gist options
  • Save mwelburn/3ac0eb70c1ebd2f51257 to your computer and use it in GitHub Desktop.
Save mwelburn/3ac0eb70c1ebd2f51257 to your computer and use it in GitHub Desktop.
Remote Object - Create Record
var activity = new RemoteObjectModel.Wellness_Activity__c();
activity.set('Wellness_Goal__c', goal.Id);
activity.set('User__c', userId);
activity.create(function(error, result, event) {
if (error != null) {
alert(error);
} else {
alert('Activity logged successfully!');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment