Experiences and solution for server error with function Utils.addToCalendar

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Script Talk Experiences and solution for server error with function Utils.addToCalendar

Viewing 2 reply threads
  • Author
    Posts
  • February 20, 2022 at 1:13 AM #46793

    Chris Ju
    Participant

    Hello,

    i want to share my experience with the ‘Utils.addToCalendar’ function…

    For me, the server error 415 (in calendar app) almost always occurred (some weeks ago also saw 515) when I created a calendar entry with the example script from the TF online help website (https://www.tapforms.com/help-mac/5.3/en/topic/javascript-api). Now I noticed that the error occurs only if you use the ‘Utils.updateCalendarEvent’ function immediately after the ‘Utils.addToCalendar’ function.

    I suppose the script on the help page written like this in order to save the ‘identifier’ in a field. But it is not necessary to use the update function, because ‘var identifier = utils.addtocalendar (…);’ already creates the event. The identifier variable could then be stored… However, should it be necessary to use the update function, a delay is necessary. Then the error does not occur, too…

    Maybe that helps someone… I needed hours to get to this finding.

    Thanks
    Chris

    February 21, 2022 at 1:16 AM #46808

    Brendan
    Keymaster

    Sorry for the confusion with the sample script. The update function was there only to show that you can update an event, not that you should add and then update all the time.

    I’ve updated the documentation to show that the updating is optional and should probably be done sometime later and that you’d have to store the identifier in another field.

    Sorry this caused you this trouble. But thanks for pointing out this issue.

    February 21, 2022 at 10:06 AM #46812

    Chris Ju
    Participant

    No problem, everything is always good in the end ;-) …

Viewing 2 reply threads

You must be logged in to reply to this topic.