Symptoms
When transferring data to or mapping a SmartObject output on View initialize to a Picker control that is mapped to the 'Sharepoint Integration People Picker Source' andgt Search method it errors with:
Thread 1: Exception from HRESULT: 0x80131904
Type: SourceCode.SmartObjects.Client.SmartObjectException
Due to the lookup column limit, the user is stored in a text field column in sharepoint and rendered using a Picker control against the 'Sharepoint Integration People Picker Source' SmartObject.
Diagnoses
This is a limitation between SharePoint and K2 with how K2 handles SharePoint's User ID columns.
Resolution
As a workaround, the following was implemented:
1. Mimicking how a Picker control would be generated against a 'Person or Group' type column in Sharepoint, the 'Value' that it would store would be in the format 'AAD:administrator@denalix.onmicrosoft.com'. Generated ootb, the Picker control would also filter using the Name, DisplayName and Email field.
2. Passing in 'AAD:administrator@denalix.onmicrosoft.com' will not resolve in this situation and as such manipulation will need to be done
3. A data label control (can be hidden) and a 'Replace' function expression can be used to remove the security label 'AAD:' and as such allow for the resolving of the Picker control
4. Instead of passing in the List SmartObject's output property or using a data transfer event (which results in the original error) the Picker Control's Resolve method was called on View initialize and passing in the manipulated data label value 'administrator@denalix.onmicrosoft.com' for rendering the correct value.