Created
November 19, 2019 20:41
-
-
Save brianbier/20eeec6fd578cb0a90d667cc955af21d to your computer and use it in GitHub Desktop.
Revisions
-
brianbier revised this gist
Nov 19, 2019 . No changes.There are no files selected for viewing
-
brianbier renamed this gist
Nov 19, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
brianbier created this gist
Nov 19, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ window.open('/lightning/o/Event/new'); var urlEvent = $A.get("e.force:navigateToURL"); urlEvent.setParams({ "url": "/lightning/o/Event/new" }); urlEvent.fire(); var createRecordEvent = $A.get("e.force:createRecord"); createRecordEvent.setParams({ "entityApiName": "Event", "defaultFieldValues": { 'Change_Machine_Event__c': true } }); createRecordEvent.fire(); const actionApi = component.find('quickActionAPI'); // const args = { entityName: 'Contact', actionName: 'budget' }; const args = { actionName: "Contact.Trigger_meetin"}; actionApi.selectAction(args) .then(() => { console.log('im here now') // actionApi.invokeAction(args); }) .catch(error => { console.log(JSON.stringify(error)); }); actionApi.getCustomAction(args).then(function (customAction) { console.log('customAction',JSON.stringify(customAction)) if (customAction) { customAction.subscribe(function (data) { // Handle quick action message }); customAction.publish({ message: "Hello Custom Action", Param1: "This is a parameter" }); } }).catch(function (error) { // We can't find that custom action. console.log('the error would fire',error); });