You need to sign in to do that
Don't have an account?
Karthik Gunasekaran
how to show different lightning component on a button click within same region of a record page in lightning console
Hi, i creates a record page(selected Template is with 3 sections) for my lightning console. I added a custom lightning component "Interaction Log" to the right side section. On click of "save log" i need to open another lightning component in the same section where i highlighted. Anyone can plz help me to sort this out as it is opening always as a seperate subtab(which i don't want).
Thanks,
Karthik
Thanks,
Karthik
It worked for me, hope it helps for you.
All Answers
It worked for me, hope it helps for you.
That was amazing. It works perfectly as i expect. Thanks a lot!..
I have another issue with same component. I am pasing record id from studysMainCmp component to studys component. In studys component i have a contact lookup which i need to prepopulate on doinit of studys component. But it is not prepopulating.
Here is my code. Any idea?
Note: When i add studys component directly to a lightning page. It is prepopulating with below highlighted code.
cmp:
<aura:attribute name="workitem" type="Work_Item__c" default="{'sobjectType':'Work_Item__c'}"/>
<force:inputField aura:id="taskContact" value="{!v.workitem.Contact__c}"/>
JS controller:
doInit: function(component, event, helper) {
var action = component.get("c.loadWorkitem");
var workitemId = component.get("v.recordId");
var workitem = component.get("v.workitem");
action.setParams({
"recordId":workitemId
});
action.setCallback(this,function(response){
var state = response.getState();
if(component.isValid() && state === "SUCCESS"){
workitem = response.getReturnValue();
component.set("v.workitem", workitem);
//Using force:inputField it is not possible to set a prepoulated value directly in controller using aura id for example –
//component.set('v.workitem.Contact__c', '001f4000002TfjEAAS');
//The workaround to assign a lookup object as a value is –
var contactValue = [{
type: 'Contact',
id: workitem.Contact__c,
label: workitem.Contact__r.Full_Name__c
}];
component.find("taskContact").get("v.body")[0].set("v.values", contactValue);