-
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 5 years, 2 months ago by
Prachi.
-
This discussion was modified 5 years, 2 months ago by
Forcetalks.
-
This discussion was modified 5 years, 2 months ago by
Forcetalks.
-
This discussion was modified 5 years, 2 months ago by
Log In to reply.
Popular Salesforce Blogs
![Salesforce Einstein: The Beacon of Business Growth](https://images.forcetalks.com/wp-content/uploads/2024/09/02130353/Blog-banner-Sep-2022-2024-09-02T183343.123.png)
Salesforce Einstein: The Beacon of Business Growth
Businesses need more than just the right services and products to stand out in the market. Strategical use of data is paramount to promote quality…
![Smarter Business with Salesforce Einstein Discovery, an AI-Powered Data Analytics Tool](https://images.forcetalks.com/wp-content/uploads/2019/11/27082219/FT-Banners-5-2-1.jpg)
Smarter business with the AI-powered data scientist, Einstein Discovery
In this highly competitive market, organizations are constantly trying to analyze their data and make informed decisions to outrun their competitors. That is where data…
![](https://images.forcetalks.com/wp-content/uploads/2022/02/10111340/sa_1644491192TSOFI-1024x537.png)
Typical Stages of Salesforce Integration
The full version was originally published at Twistellar Delivering a seamless customer experience is a key element fuelling your business growth. Providing this kind of…
Popular Salesforce Videos
How to Trigger the Lead Assignment Rule from Flow Builder
In this video, we will talk about how to trigger the lead assignment rule from the flow builder Salesforce. Here is the timestamp for your…
Deleting Contacts in Salesforce Marketing Cloud
Delete contacts to remove contact information from your Marketing Cloud Contact Builder account. Delete contact information to meet data compliance regulations. In this episode, Eliot…
Drive Adoption with In-App Guidance and our Prebuilt Salesforce Package!
With In-App Guidance generally available in the Winter ‘20 release, there’s no better time to start taking advantage of the easiest way to add informative…