When you drag the event in the calendar for the first time, no problem. The playout_tags are there as expected. If you move the event a second time, the values are null. How can you access the missing data?
And how can you get the ID from the database instead of a generated ID?
Has it anything to do with uncommited changes?
Help would be very appreciated. Thanks in advance!
Re: getData function in beforeDragMoveEnd callback
Posted: Tue May 23, 2023 5:40 pm
by kevinschweikert
Nevermind, i found the issue. Our API just sets the playout_tags on load requests but not on sync requests...
But the ID question is still unanswered.
Re: getData function in beforeDragMoveEnd callback
Posted: Tue May 23, 2023 6:41 pm
by marcio
Hey kevinschweikert,
Glad that you figure out the issue with the array field.
Re: getData function in beforeDragMoveEnd callback
Posted: Wed May 24, 2023 11:09 am
by kevinschweikert
Hey marcio,
thanks for the quick reply! The isPhantom property is true in this case.
Could you help me out, how to get the persisted ID of an existing event from the database in the beforeDragMoveEnd function?
I tried using calendar.project.commitAsync() but that didn't change anything.
Re: getData function in beforeDragMoveEnd callback
Posted: Wed May 24, 2023 5:32 pm
by marcio
Hey kevinschweikert,
Try to access the id and other properties like this
In the return packet, it has to have the phantom id which is to be matched up with.
Re: getData function in beforeDragMoveEnd callback
Posted: Thu May 25, 2023 7:29 pm
by kevinschweikert
But how can the API know, what the PhantomID is, when it's not in the request from the client (only, id, startDate and endDate are available in my example). Does the server also have to keep track of the PhantomIDs?
In the sync request with the create event request, there is a PhantomID and we send it right back.