-
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, 5 months ago by
Prachi.
-
This discussion was modified 6 years, 5 months ago by
Forcetalks.
-
This discussion was modified 6 years, 5 months ago by
Forcetalks.
-
This discussion was modified 6 years, 5 months ago by
Log In to reply.