-
How to prepopulate EventWhoids in Salesforce lightning component?
I am trying to create a lightning component which uses e.force:recordCreate and prepopulates a list of ContactIds in the EventWhoIds field. However, the contact do not get prepopulated in the form.
console.log(component.get("v.contactIds"));
var contactRecords = component.get("v.contactIds");
console.log("contactRecords: " + contactRecords);var createEvent = $A.get("e.force:createRecord");
createEvent.setParams({
"entityApiName": "Event",
"defaultFieldValues": {
'WhatId' : component.get("v.recordId"),
'EventWhoIds' : contactRecords
}
});
createEvent.fire();-
This discussion was modified 6 years, 2 months ago by
Prachi.
-
This discussion was modified 6 years, 2 months ago by
Forcetalks.
-
This discussion was modified 6 years, 2 months ago by
Forcetalks.
-
This discussion was modified 6 years, 2 months ago by
Log In to reply.
Popular Salesforce Blogs
Top 5 Considerations in Choosing Your Salesforce CPQ Partner
Congratulations, you’ve made the decision to implement Salesforce CPQ! Now comes the challenging task of choosing the right Salesforce CPQ partner to help fulfill your vision…
How I Landed Into My First Job In The Salesforce Technology
In this blog, I am going to share about my journey, how I landed my first job in Salesforce technology. To give an overview of…
Get Picklist Values in Salesforce Lightning Component From a Common Apex Function
See below the code example to get Picklist Values in Salesforce Lightning Component from a Common Apex Function: CommonPicklist.cmp <aura:component controller="CommonPicklistController"> <aura:attribute name="ObjectName" type="String" default="Opportunity"…
Popular Salesforce Videos
Salesforce Consulting - WHAT YOU NEED TO KNOW
If you're already working as a Salesforce Professional or you're interested in where your Salesforce Career will take you this is for you. This explains…
How Do All Salesforce Products Come Together
The products of Salesforce run completely in the cloud. Therefore, the companies don’t need to fret about costly maintenance and setup charges. Additionally, cloud technology…
AMPscript Personalised Subject Lines in Salesforce Marketing Cloud
Cameron Robert from Datarati demonstrates how to use Subscriber Data and AMPscript to personalize your email Subject Lines in Salesforce Marketing Cloud. What you'll learn:…