-
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 4 years, 11 months ago by Prachi.
- This discussion was modified 4 years, 11 months ago by Forcetalks.
- This discussion was modified 4 years, 11 months ago by Forcetalks.
Log In to reply.
Popular Salesforce Blogs
A Small Guide On Salesforce Integration: Benefits | Types | Perks
As businesses expand their operations, they often need help to keep up with the increasing workload. From managing customer information to tracking sales leads, the…
Navigating ERP Solutions: Custom Systems, Well-Known Providers, and Block-Based Approaches
Enterprise resource planning (ERP) software is used by companies to manage routine business operations like accounting, order and project management, risk management, compliance, and supply…
Getting Started With Salesforce Einstein Discovery
What Is Einstein Discovery? Einstein Discovery expands your information examination with the force of AI, man-made brainpower (AI), and factual investigation. Einstein Discovery rapidly dissects…
Popular Salesforce Videos
Send WhatsApp and Save Chat using Lightning Component Salesforce | Salesforce Tutorials
In this video you will learn to send #WhatsApp using Lightning Component Salesforce. Also we will create a custom object to store the chat. Features…
Classes and Objects in Salesforce | Tutorial Video
The concept of OOPs is really important for any developer who is working with Salesforce or JavaScript, Java, or any other programming language. I have…
Tour to the Dreamforce National Park!
What happened at Dreamforce? #ArtificialIntelligence was a consistent theme, a lot more about Commerce, about Customer 360, etc Missed Dreamforce? Then, take a tour of…