Business Logic in the Outlook Form

Because the LitCrit Outlook form and the CML application can run independently of each other, business logic must ensure that only the currently available user choices are displayed. This means determining whether the LitCrit form is running on its own or whether the CML application has also been installed and configured to work with critiques. This task must be performed as the LitCrit form is opened through Microsoft Outlook.

The CritiqueEnabled variable stored in a hidden field on the Outlook form is initialized to 0 when the form is opened, which means that the form is running stand-alone. The form then attempts to read the CritiqueEnabled variable in the FmLib database on the Web server. The value of this tinyint variable reflects whether an administrator has stated that the CML application can work with critiques. If it is set to 0 (False) or if it cannot be read — because the CML application is not installed or there is no network connection to a Web server hosting CML — the LitCrit form defaults to stand-alone operation.

Running stand-alone means that the Add Critique to Library dialog box is not displayed as the form is opened (see Adding a New Critique in Outlook), nor is the Choose Title Dialog Box available as a menu choice.

This logic is written in script that resides on the Microsoft Outlook form itself. It is triggered as the form is opened, by the Form_Onload event. For information on the creation of this form and its script, see Creating the Microsoft Outlook Form.