Writing Server Code to Populate Communication Data

Once the template has been created and is available within the application, the caseworker can select the template when creating a communication. The caseworker then enters all the other details required to create the communication such as the correspondent name, communication name etc.

When the communication is opened, the server action that is called returns the variable data to be inserted into the fields in the Microsoft Word template, i.e., the actual name and address of the correspondent is returned.

The server action returns the variable data as an object of data type blob. The object is made up of name-value pairs with the "name" being the fields in the Microsoft Word template and the "value" being the data to be inserted for the field when the document is created.