Create lightning component that contains button On campain member page which calls action to create new Campaign member record populating few field values from existing cm record in another campaign as shown in following picture
<aura:component implements="force:lightningquickAction" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
</aura:component>
Controller.js
doInit : function(component,event) {
var createRecEvent = $A.get("e.force:createRecord");
createRecEvent.setParams({"defaultFieldValues": }); // For more info go through salesforce documentation.
createRecEvent.fire();
}
Hope it helps, if it does, mark it as solved. Thanks
There is a similar post on which i commented:-
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000g9GgQAI
Thanks
Can you provide me full code
Thanks
Chiyan.
Thanks
Try This Code,
Component:
Controller.js:
Please mark it best answer if it helps you.
if you want dynamic value populating please refer i commented:
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000g9GgQAI