This post explains how to fix an issue that causes only the text System.string being displayed in a new K2 Appit task notification email.
It happens when any part of the notification contains a SharePoint property that is of type User. The obvious fix is to map this SharePoint field’s value to a K2 data field and use that in the email.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
Again, tt happens when any part of the notification contains a SharePoint property that is of type User. The obvious fix is to map this SharePoint field’s value to a K2 data field and use that in the email. The issue with this approach is that K2 seems to map the user’s fully qualified name (FQN) into the data field, not the user’s actual display name.
The “Employee (Value)” field is the SharePoint value of the user. The System.sting issue is now fixed, but the user’s display name is still not displayed.
How to get a user’s display name in K2 Appit from the FQN?
Open the K2 Appit SmartObject and add a new field “Employee (Display Name)” of type text.
Open the SmartObject method that does the user details lookup and map the input and output fields.
Using the K2 Appit SmartObject tester, execute the method and see the correct details being returned. This include the user’s display name.
The new property can now be used in the K2 Appit process and the user’s display name will correctly be looked up.
This post highlights how flexible the K2 Appit platform is. There are many utilitarian and helper SmartObjects, properties and methods available that can be explored using the K2 Appit SmartObject explorer. The results of which can help you find solutions like the ones above.