System Call functions run predefined SmartSimple operations on the server from a Browser Script custom field.
Syntax
This section defines the required format for referencing a System Call inside a Browser Script custom field. Each System Call is referenced using the following format:
<!--SysCall_function(@parameter 1@,@parameter 2@,@parameter N@)-->
- @objtype@ and @objid@ are reserved keywords.
- objtype can be referenced by the integer value for the entity type (for example 23, 18, 30, or 40) or by a constant such as levelone, level1, leveltwo, level2, levelthree, level3, contact, people, or company.
Nested-function example: SysCall_updatesysvar, incrementing a numeric system variable named Number using an sscalculation.
<!--SysCall_updatesysvar('Number',<!--@sscalculation('@system.Number@'+1)-->)-->Available System Calls
The following table lists every System Call currently available, along with its required parameters and what it does.
| System Call | Parameters | Description |
|---|---|---|
| SysCall_updatestatus | objecttype, objectid, 'StatusName' | This system call updates the status of an object to a new status. |
| SysCall_workflow | objecttype, objectid, 'WorkflowTriggerName' | This system call initiates a workflow. |
| SysCall_activatepeople | userid, activateType | This system call activates a contact as a user. See Parameter Values for activateType options. |
| SysCall_sendpassword | userid | This system call sends a password to the specified user. Works the same as the Send Password button. |
| SysCall_updaterole | userid, updatetype, 'rolesNamesDelimitedByCommas' | This system call updates user roles. See Parameter Values for updatetype options. |
| SysCall_updatesysvar | 'VariableName', 'VariableValue' | This system call updates an existing system variable to a new value. |
| SysCall_updateassociation | companyid, userid, 'role name', updatetype | This system call updates a contact association. See Parameter Values for updatetype options. |
| SysCall_charitycheck | companyid | This system call runs the SmartSimple GuideStar Charity Check procedure against the specified company. |
Parameter Values
Some System Calls accept parameter values with specific meanings; the tables below define those values for activateType and updatetype.
activateType (for activatepeople)
The activateType parameter controls how a contact is activated as a user.
| Value | Meaning |
|---|---|
| 0 | Deactivate the existing user. |
| 1 | Activate the user with access through the administrative or portal interface. |
| 3 | Activate the user with access through the Applicant Tracking Interface only. |
| 5 | Activate the user with access through web service login. |
updatetype (for updaterole)
The updatetype parameter controls how roles are applied when using updaterole.
| Value | Meaning |
|---|---|
| 1 | Add roles to the contact. |
| 2 | Remove all existing roles and add the new roles. |
| 3 | Remove the listed roles. |
updatetype (for updateassociation)
The updatetype parameter controls how a contact association is changed when using updateassociation.
| Value | Meaning |
|---|---|
| 1 | Add the association. |
| 2 | Update the association. |
| 3 | Remove the association. |
Trigger Types
The trigger selected on the Browser Script field determines when a System Call runs. The table below defines each trigger type.
| Trigger | When the System Call Runs |
|---|---|
| On Load | The system call runs when the page is requested. |
| On Demand | The system call runs when the user clicks the button on the page. |
| On Save | The system call runs when the page is saved. |
Two settings apply specifically to the On Demand trigger:
- Show Button in Footer – Displays the button in the footer instead of on the page.
- Show in View mode – Exposes the button in both view and edit mode.