Hello,
I'm creating an Annual Leave process as my first proper foray into K2.
This currently consists of:
- A SmartObject for the data fields.
- A Request Form based on a Request (item) View for the current request, and a My Requests (list) View displaying the user's previous requests.
- An Authorisation Form for line managers, based on the submitted Request View and a Similar Requests (list) View that displays other requests that have been submitted by users in the same department, which overlap the current request.
- A workflow proj in K2 Studio.
What works so far:
User submits a request via the Request Form. User receives a confirmation email. Request status is updated to Requested.
An email is sent to the user's manager who can then click the link and open the Authorisation form.
The Authorisation form includes the "Workflow View" at the top, where they can select Approved, Declined or Rework from a drop-down. This updates the request status, date stamps it, and each outcome generates an email to the user worded accordingly.
What doesn't work:
I have a Comments field on the Request View, that is only visible to the authorising line manager. The idea is that the manager can leave an explanatory comment, particularly if asking the user to rework (change leave request dates) and then select the Request Status in the Workflow View.
However, I can't get it to retain this comment in the SmartObject. Whatever I try, the comment does not save. After entering a comment and saving, I should be able to go into the My Requests (list) View and see the comment next to the request, but it remains blank.
Using the "After the workflow action was submitted" Rule on the Authorisation form, I've tried executing the Save method on the view and on the smartobject. I've tried doing a "transfer data" to the smartobject, a "list refresh" on the My Requests view. I've also tried executing methods on the Control (the Comment field).
I've also tried moving these actions to a different rule, such as "When a control on a View raises an event" (On the Request form, when the comment field is Changed).
The Request form has a Submit button on it, and when the user clicks it, one of the actions is the Request view's Create method. This works (it creates a request), so I don't quite understand why the same view's Save method doesn't work when the manager enters a comment and either leaves the field, or submits their selected Request Status.
There are a couple of further issues related to this, but I guess I'll get onto those if and when I can get this bit resolved.
Thanks in advance for any help...
Gram