Appointmentadded event: key returns guid, not id

Posted by: fsegui on 7 October 2020, 8:54 pm EST

  • Posted 7 October 2020, 8:54 pm EST


    I've bound appointments to my database through the smart designer like this:

    When a new appointment is added, I try to get the eventid like this but it returns the guid.
    Dim eventId As Integer = Val(eventArgs.Appointment.Key(0))

    One things that is weird:
    when loading the schedule, I'm filling info from database and it raises each time the appointmentadded event. in this case, I get the eventid and not the guid.
  • Replied 8 October 2020, 10:41 pm EST

    Hi Florent,

    As said in the given link, the array always contains a single object. It can be either an System.Int32 or System.Guid value depending on which one is actually used for binding this data. For example, if you bind AppointmentStorage to the database and set IndexMapping, this property will return an System.Int32 value. If you set IdMapping, this property will return a System.Guid value.

    So if you have set the Index mapping then it should return an integer value.
    Can you please share your dummy data with which you are facing the issue at your end so that we can test the same at our end and forward it further for investigation?

    Prabhat Sharma.
  • Replied 8 October 2020, 11:53 pm EST

    Here is a backup from the database with dummy events. Hope it's enough.
  • Replied 12 October 2020, 5:58 pm EST

    Hi Florent,

    We too can observe the issue at our end and escalated it to the developers.
    We will let you know once we get any update on this from their end.
    [Internal Tracking ID: 466997]

    Prabhat Sharma.
  • Replied 12 October 2020, 6:01 pm EST

    Hi Prabhat Sharma,

    Thanks for your feedback, I'll wait for the developers' update.

  • Marked as Answer

    Replied 14 October 2020, 9:05 pm EST

    Hello Florent,

    When adding the DataSource please make sure that the eventid Column's AutoIncrement property is set to True, and AutoIncrementSeed and AutoIncrementStep values to something different from -1:

    Please find the attached sample implementing the same.

    Prabhat Sharma.
  • Replied 14 October 2020, 9:07 pm EST

    Here is the sample
  • Replied 14 October 2020, 10:50 pm EST

    Hi Prabhat Sharma,

    Thanks for your feedback, works fine now.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels