Skip to content

Instantly share code, notes, and snippets.

@pranayjswl007
Created April 9, 2019 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pranayjswl007/c5bec83bc2ff3b0c905edd9ecb3b34ae to your computer and use it in GitHub Desktop.
Save pranayjswl007/c5bec83bc2ff3b0c905edd9ecb3b34ae to your computer and use it in GitHub Desktop.
createRecord(event ){
let newContact = {FirstName : 'Pikachu' ,LastName : 'Raichu'};
createMyContact({con : newContact}).then((resp)=>{
this.recordId = resp.Id; //this will auto call wireMethod/
});
}
@AuraEnabled
public static contact createContact(Contact con){
insert con;
return con;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment