Skip to main content
Skip table of contents

Event commands

Events are appointments, meetings etc . An event may be repeated, eg. it may occur every friday in a month, or on the 1st of every month in a year and so on. The instance of an event on a given date is simply called an instance. The id field in an event object refers to the event, whereas the instanceid field refers to an instance.

GetEventTypes

Get a list of the event types.

Input

Output

typescollection[ eventtype ]A collection of all event types
defaultnumberThe MB ID of the default event type


CreateUpdateEvent

Creates or updates an event in Microbizz.

If an event with the given event id already exists, then the event will be overwritten.

If the event provided has an event id of 0, a new event will be created and a new event id will be provided.

Version 2 allows user to add a custom userid.

Input

eventeventThe event to create/update

Output

eventeventThe event object as it is in Microbizz after the update

DeleteEventByID

Delete an event in Microbizz.

Input

eventidnumberThe Microbiz ID of an event
allusersbooleanIf 0 then current user will be removed from the event. If 1 then all users will be removed from the event.

Output

---

An event can only be deleted if the current user is attached to the event.


DeleteEventInstanceByInstanceID

Delete an instance (i.e. date) of a repeated event.

Input

instanceidstringThe Microbizz instance ID of an event for a date

Output

---

GetEventsByUserAndDate

Get a list of events in Microbizz.

This can be quite slow if fromdate and enddate are not the same. May return same event more than once if fromdate and enddate are not the same; the event objects will then have the same value in the id field but will have different values in the instanceid field.

Input

fromdatedate
todatedate
useridnumber

Output

calendarentriescollection[ event ]A collection of events

GetEventByProductionID

Get the event that is associated with a production (AKA planning).

Input

idnumberThe ID of a production planning

Output

calendarentriescollection[ event ]A collection of events,  there is always only one

GetMyStodos

Read a list of relevant reminders (“stodos”).

Input

None--

Output

stodoscollection [ stodo ]List of reminders

StodoAccept

Accept or postpone a reminder (“stodo”).

Input

stodoidnumberThe ID of a reminder
useridnumberNot used but required for historic reasons, just set to 0
postponenumberNumber of minutes to postpone the reminder; if not included, or if 0, then the reminder is accepted.

CreateLogByUser

Creates a log by a user on an object.

Input

typescollection[ eventtype ]A collection of all event types
modulestringThe module of the object which the log is placed on. Options include [todo, customer, project2, project, invoice]
sysrefnumberthe id of the object which the log is placed on.
textstringThe text which is written in the log.
usernumberThe id of a user. if none is written it will try to use the logged in user doing the call.

Output

typescollection[ eventtype ]A collection of all event types
msgstringA response of if the log succeeded or why not.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.