Hello,
My calendar is set to the "dayresource" view, and I'm attempting to prevent the creation of new appointments based on certain conditions, including the resource. Specifically, I want to avoid displaying the event on the calendar and prevent the event editor from opening. It appears that using the "beforeAutoCreate" function could be the simplest approach to achieve this.
I need to perform some actions before a new event is created. To accomplish this, I must retrieve the resourceId to determine which column the new event will be created in.
However, when I tried to pass "resourceRecord" (where I can easily find the resourceId) in the function arguments, as mentioned in the documentation, it returns "undefined"...
I have access to the "source" object (DayResourceView), which should allow me to retrieve this information, but when I log it, the "resourceId" field is null...
There must be a way to retrieve the resource on which the event is to be created at that specific moment, right?
Thanks for the help!