...
F.ex. if the script is run to generate the value for a task custom field, the context is the task. The context is accessed through the object named this
. Script objects that represent objects in Microbizz (tasks, companies etc) provide a few functions:
Function | Example | Description |
---|---|---|
|
| Read a named field from the object |
|
| Reads and formats a named field from the object |
|
| Check if the object is in the database, f.ex. you can check if the task refers to an existing customer |
If you are using the new syntax: Refer to the API documentation for details about the various objects. Some objects allow you to easily access other objects that are somehow connected, e.g. if this
is a task, then this.user
is the responsible user for the task.
Notice that the new syntax is still very experimental, you should probably use the old syntax. As Microbizz migrates to the new + modules (Task+, CrM+ etc) the new objects in these modules will have the same field names in the API as internally and so there will be no new / old syntax.
Microbizz object | Documentation | List of connected objects |
---|---|---|
Customer | this.person this.user | |
EdiInvoice | this.todo this.user this.customer | |
Equipment | this.placeofhome this.user | |
Invoice | this.user this.customer | |
InvoiceLine | this.todo this.customer | |
Person | ||
Project | this.user this.customer | |
Registration | this.todo this.user this.customer | |
Task | this.customer this.user this.project (same for both new and old projects) | |
User | ||
Product | ||
Planning | ||
Quotation | this.customer this.user | |
Appointment | this.user this.customer |
...