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 reply 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 the K2 Designer site. Typically, you can access the K2 Designer site through a URL like https://[K2Environment]/Designer/, where [K2Environment] is the unique name of your K2 environment. If you do not know what this value is, please ask your K2 administrator.
      If you are using a training or evaluation environment provided by K2, you can log in to the environment with the following credentials:
      Username: Denallix\Administrator
      Password: K2pass!
      To launch K2 Designer, you can use the Start Menu (Start > (All Programs) > K2 > K2 Designer), click the start menu and start typing "k2 designer", or there should also be a shortcut in the favorites of the web browser.
    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 and SmartObject for an external data source.

Next Step: 2. Create a SQL Server Service Instance and Generate a SmartObject