const defaultValues = encodeDefaultFieldValues({
StartDateTime: '2022-08-22 20:00:00',
});
this[NavigationMixin.Navigate({
type: 'standard_objectPage",
attributes: {
objectApiName: 'Event",
actionName: 'new'
},
state : {
navigationLocation: 'RELATED_LIST',
defaultFieldValues: defaultValues,
}
});
I am building a Lightning Web Component in which I am try to make a functionality, on a click of button it navigate to new record page of Event object. Here I am trying to provide default value to StartDateTime field of Event Object but it isn't accepting this value.
{}
or you could read how to enable syntax highlighting for code