Hi, I’m working on an extension to WixEvents to provide an accessible collection for the Rsvps.
I’ve created the collection which has fields eventId and MemberId and the collection is populated and managed through backend functions. So adding guests to an event creates my Rsvp record automatically, deleting an event deletes all of the Rsvps associated with it.
Now the page allows both the event and member to chosen. If the event changes then the matching rsvp needs to be retrieved. Equally if the member is changed then the matching rsvp needs to be retrieved.
The challenge I have is that the Rsvp’s can’t be retrieved until both the Event record and the Member Record promises have resolved. How can I be sure both promises are resolved before attempting to find the rsvp?
you need to use Promise.all