Script Examples for Exchange Server
In each example, the "Example Script" section provides the code for the function or procedure that should be placed in the Script Editor, which is available from the View menu and then by selecting Code.
The following examples are available for use in your workflow scripting:
In This Section
- Creating and Sending an E-mail
Illustrates the use of the GetnewWorkflowMessage method. - Creating and Posting a Message
Creates and posts a message in your workflow-enabled folder in response to workflow events. - Evaluating the Current User
Describes a CheckUser function, which determines the user who initiated a state change. - Writing Messages to File
Creates a text file and adds text to the file in response to workflow events. - Function Returning the HTTP URL of a File in the Store
Sends an e-mail message containing a link to an HTTP URL of the message in the store. - Expire Item and Send Notification
Sends e-mail to the item owner indicating that an item that has been awaiting attention/action has now expired. - Set Permissions
Specifies what user (using the user's SMTP e-mail address) should have author access to the item. You must call ClearPermissions prior to setting permissions. - Clear Permissions
Changes the permissions for the person who submitted the form change to read-only after an item is submitted.
Related Sections
- Scripting in the Workflow Designer for Exchange Server
To add functionality to your workflow process, you can add Microsoft® Visual Basic® Scripting Edition (VBScript) to your workflow events. - Creating Script Procedures
To use procedures or functions in your workflow process, you create the script in the script editor. - Workflow Process Security Mode
The workflow process security mode controls the types of actions that can be executed by your workflow scripts. - Choosing Workflow Events
Determine the appropriate event to use to trigger a procedure. - Debugging Script in the Workflow Designer for Exchange Server
The Workflow Designer relies on server-side script that cannot display user information. As a result, you cannot use typical debugging options. The options available to you depend on your access to the server on which the scripts are running.