1. Add the Approver Comments Property to the Leave Request SmartObject

In this step, you will add a new property (Approver Comments) to the existing Leave Request SmartObject. This allows the approving manager to enter any questions or comments they have about the request. This step demonstrates how to edit an existing SmartBox SmartObject. Adding new properties to an existing SmartBox SmartObject is relatively simple. You should take caution however, when deleting properties. Any controls or rules that rely on those deleted properties will likely cause errors!

  1. In K2 Designer, edit the Leave Request SmartObject and add a Memo type property called Approver Comments.
    The Leave Request SmartObject with Approver Comments
    1. Launch K2 Designer
      If you are unsure of how to launch the K2 Designer site, see Accessing K2 Sites.
    2. Browse to the category explorer, and then expand the All Items > K2 Learning > Leave Request > SmartObjects categories. Right-click the Leave Request SmartObject and select Edit.
      Edit the Leave Request SmartObject
    3. Next, you will add the memo property to the SmartObject. (In a later step, you will edit the Leave Request Item View and manually add this new property to the view). On the PROPERTIES screen, click Add. For the Name, enter
      Approver Comments
      then select the Memo option from the data Type drop-down. Click OK (at the bottom of the Add Properties screen), then click FINISH to save the new property. Remember, when working with SmartObjects in the K2 Designer, finishing the SmartObject "publishes" it to the K2 server. The new property is now available for use in views, forms and workflows.
      Adding a new property to an existing SmartBox
Review

In this step, you learned how to edit an existing SmartBox SmartObject and add a new property. Clicking the Finish button publishes the SmartObject to the K2 server. Be careful when deleting properties from a SmartObject. Workflows and other components bound to deleted properties will produce errors! In the next step, you will create a new service instance to an external data source.

Next Step: 2. Create a SQL Server Service Instance