Symptoms
SmartObject generated from list in SharePoint 2013 executes without error, but only some fields are populated
Diagnoses
SharePoint 2013 OnPrem Farm.
Content types are stored in a content type hub and one site collection is subscribing to it.
On this site collection I've added one of the content types to a list (leaving the Item content type) and built the K2 for SharePoint smartobjects and forms using the K2 for SharePoint wizard.
Customized the smartforms and also built a workflow for this list.
Throughout development a couple of changes were made to the content type at the content type hub level. (Columns added and others removed)
During the course of development removed the Item content type from the list.
Every time regenerating the smartobjects without any problems.
The last change that was made was to change a datetime field to be only of type date, to re-order the options in a choice field and to add a multiple line (unlimited length) field to the content type.
When the changes were pushed to the list and after I regenerated the SmartObjects when trying to execute the Create List Item method, only a couple of fields were saved to the actual list. Normal text fields were ignored and basically only a managed metadata field and one or two others were saved.
This happened from the K2 smartform and by manually executing the method using the SmartObject Service Tester tool.
Also when trying to create a package from the list I received an object reference not set to an instance of an object error.
At the moment I'm not sure how I can proceed to get the smartobjects to work properly again.
Please assist
Resolution
There were two issues as per this call.
The first related to fields on the destination list which were named differently than the source list.
Once the destination list's columns were aligned, the deployment could go further.
The second issue related to an Object Reference error that was thrown when you try to deploy a package in K2 for SharePoint after your first attempt threw some sort of error.
This related to the entry in the Session table not being cleared.
A coldfix was sent to resolve this problem and since it has been applied to the Production environment we do not receive the object reference errors any more.