-
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 Customization vs Configuration: What's the Difference?
Introduction: A Salesforce Development Company particularly deals with providing solutions to businesses with the help of Salesforce CRM. Before moving to the main point of…

Learn How to Display Bar Chart in Salesforce Lightning Web Component
Introduction The graphical representation of information and data is known as data visualization. Data visualisation tools make it easy to see and understand trends, outliers,…
Popular Salesforce Videos
Salesforce Commerce Cloud Migration Key Considerations
Embarking on a Salesforce Commerce Cloud migration journey? This extract from our latest webinar outlines the key considerations and best practices to ensure a seamless…
Salesforce and Disney Studios Join Forces
Salesforce and Disney Studios Content recently announced a five-year innovation partnership to help support Disney filmmakers and marketers using the Salesforce platform. By naming Salesforce…
Create Walkthroughs in Salesforce Lightning Experience
This video shows you how to create a walkthrough with the In-App Guidance Builder. Then you can create hands-on guided training experiences for in-app onboarding,…