Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component controller="MyController" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
- <aura:attribute name="recordId" type="Id"/>
- ...
- <button type="button" onclick="{!c.doRun}">Activate Next</button>
- </aura:component>
- <apex:page standardController="CustomObject__c">
- <apex:includeLightning />
- <div id="mydiv" />
- <script>
- $Lightning.use("myApp", function() {
- $Lightning.createComponent("myComponent",
- { recordId : "{!CustomObject__c.Id}" },
- "mydiv",
- function(cmp) {});
- });
- </script>
- </apex:page>
- ({doRun : function(component, event, helper) {
- var action = component.get("c.run");
- action.setCallback(this, function(response) {
- if (component.isValid() && response.getState() === "SUCCESS") {
- $A.get("e.force:refreshView").fire();
- }
- });
- $A.enqueueAction(action);
- }})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement