Hello Folks!!
I'm facing issue while assigning the created contact with the case object.
Scenario:
I have a requirement of creating a search page that shows contacts,if contact is not found then we can create a new contact using "New Contact" button,so i have created that button and i have to link the contact that is created using "New Contact" button on case related sub-tab to the case to which it is linked.
I have created this button in lightning component using force:createRecord event.
Component Markup:
<lightning:button variant="neutral" label="New Customer" onclick="{!c.CreateNewRecord}"/>
Controller:
CreateNewRecord : function(component, event, helper){
var objectApiName = component.get("v.objectApiName");
var createRecordEvent = $A.get("e.force:createRecord");
createRecordEvent.setParams({
"entityApiName": objectApiName
});
createRecordEvent.fire();
}
Using this i'm able to create contact, but i have to link the contact which is created using this component(as a button) with the case object from where it is being created.
Apart from creating controller and trigger, is der any option to link this?
Folks please HELP me out!!
Thanks!
PFA Image