Guest User

Untitled

a guest
Mar 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <aura:attribute name="objectsToInsert" type="Object__c[]"/>
  2.  
  3. cmp.set("v.objectsToInsert", objectsToInsert);
  4. helper.insertObjects(cmp, cmp.get("v.objectsToInsert"));
  5.  
  6. var insertAction = cmp.get("c.insertObjects");
  7. insertAction.setParam("objects", objects);
  8. console.log("entries: " + JSON.stringify(objects));
  9.  
  10. "Day__c":"2016-12-07"
  11.  
  12. @AuraEnabled
  13. public static void insertObjects(List<Object__c> objects) {
  14. System.debug(objects);
  15. }
  16.  
  17. Day__c=null
  18.  
  19. @AuraEnabled
  20. public static void insertObjects(String objects) {
  21. List<Object__c> objList = (List<Object__c>) Json.deserialize(objects, List<Object__c>.class);
  22.  
  23. System.debug(objList);
  24. }
  25.  
  26. @AuraEnabled
  27. public static void MyMethodOfDoom(Date dayOfReckoning)
  28. {
  29. if(System.today() == dayOfReckoning)
  30. delete [select Id from Contact];
  31. }
  32.  
  33. let doom = new Date();
  34.  
  35. @AuraEnabled
  36. public static void MyMethodOfDoom(String dayOfReckoning)
  37. {
  38. if(System.today() == Date.valueOf(dayOfReckoning))
  39. delete [select Id from Contact];
  40. }
Add Comment
Please, Sign In to add comment