-
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, 8 months ago by
Prachi.
-
This discussion was modified 6 years, 8 months ago by
Forcetalks.
-
This discussion was modified 6 years, 8 months ago by
Forcetalks.
-
This discussion was modified 6 years, 8 months ago by
Log In to reply.
Popular Salesforce Blogs
Salesforce Automation for Small Businesses: The Essential Guide
What if you are a successful business owner, and your outstanding salespersons have to waste their time on repetitions? Sound familiar? Small business ownership entails…
Co-Create Success With the Changing Salesforce Ecosystem
The Salesforce partner community is a powerful force. It is a place where Salesforce partners manage their business, learn best practices, get support on projects,…
Popular Salesforce Videos
Gantt Charts in Salesforce Lightning | Salesforce Tutorials
In this video, you will learn to implement the Gantt Chart in your Salesforce org. We will use Google Gantt Chart scripts and we will…
Introduction to Salesforce Apex for Developers
Have you ever wanted to write a Trigger in Salesforce? This workshop is designed for people who would like to begin learning the basics of…
Are they secure enough ? Web to Lead Forms | Validations | SPAM | CAPTCHA | Salesforce Tutorials
Are you using web to lead forms ? Do you think it's secure enough ? In this video you will get all your answers. And…