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.
Output
types | collection[ eventtype ] | A collection of all event types |
default | number | The 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.
event | event | The event to create/update |
Output
event | event | The event object as it is in Microbizz after the update |
DeleteEventByID
Delete an event in Microbizz.
eventid | number | The Microbiz ID of an event |
allusers | boolean | If 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.
instanceid | string | The 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.
fromdate | date |
|
todate | date |
|
userid | number |
|
Output
calendarentries | collection[ event ] | A collection of events |
GetEventByProductionID
Get the event that is associated with a production (AKA planning).
id | number | The ID of a production planning |
Output
calendarentries | collection[ event ] | A collection of events, there is always only one |
GetMyStodos
Read a list of relevant reminders (“stodos”).
Output
stodos | collection [ stodo ] | List of reminders |
StodoAccept
Accept or postpone a reminder (“stodo”).
stodoid | number | The ID of a reminder |
userid | number | Not used but required for historic reasons, just set to 0 |
postpone | number | Number 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.
types | collection[ eventtype ] | A collection of all event types |
module | string | The module of the object which the log is placed on. Options include [todo, customer, project2, project, invoice] |
sysref | number | the id of the object which the log is placed on. |
text | string | The text which is written in the log. |
user | number | The id of a user. if none is written it will try to use the logged in user doing the call. |
Output
types | collection[ eventtype ] | A collection of all event types |
msg | string | A response of if the log succeeded or why not. |