Hi Dojo
I'm trying to create a booking with an end date lower than the current date using my own custom booking wizard but this does not seem to work. The following exception is thrown when calling the Skyline.DataMiner.Library.Solutions.SRM.BookingManager.CreateNewBooking(...) method:
Failed to create reservation TestReservation due to: Skyline.DataMiner.Library.Exceptions.InvalidBookingDataException: EndDate cannot be lower than the current date
Property name: EndDate
at Skyline.DataMiner.Library.Solutions.SRM.Model.Booking.ValidateRecurrence(ISrmContext context)
at Skyline.DataMiner.Library.Solutions.SRM.Model.Booking.Validate(ISrmContext context)
at Skyline.DataMiner.Library.Solutions.SRM.FastBookingCreation.BookingBuilder.CreateBooking(Booking bookingData)
If this is indeed not possible using the CreateNewBooking method, is there an alternative? Maybe I can use a different method?
Thank you in advance!
Kind regards
Hi Michiel,
It is not possible to create new bookings that lay in the past. No alternatives afaik.
Having the End date lower than the current Date also means that Start date is in the past... So I assume you create bookings just to archive them?
Would you be so kind to elaborate what your user story is?
EDIT: 1 thing I can think of is that you want to end a booking right 'now'. I would then add half a minute on current UTC DateTime as end time, so that both the solution and the DataMiner system has the decent time to create things and configure the objects nicely, before finishing the booking properly.
Hi Matthias. Thanks a lot for your answer! There is no need to go further into this discussion for now. I just wanted to know if it is somehow possible. Thank you!