Value cannot be null. Parameter Name: Field
The issue happens when trying to open a process inside visual studio a "value cannot be null. Parameter Name: Field" error is displayed.
SymptomsError "Value cannot be null. Parameter Name: Field" is received.
The culprit causing this issue was found to be an environmental field setting that needs to be set to true instead of false. We executed the below script which will return all your current environmental field and noticed that from the result based of the script execution that the "SmartObject Server" is currently set to false and should be set to true, so the customer performed the below steps to set it to true which they confirmed resolved this issue.
SELECT Environment.IsDefault,Environment.EnvironmentName ,FieldType.FriendlyName
AS "Field type" ,Field.FieldName ,Field.FieldDescription ,Field.IsDefault ,FieldValue.[FieldValue] ,CONVERT(NVARCHAR(MAX), FieldValue.CreateTime, 20)
AS CreateTime ,CONVERT(NVARCHAR(MAX), FieldValue.[ModifyTime], 20) AS [ModifyTime] ,FieldValue.[OwnerFullName] ,FieldValue.[CreatedBy] ,FieldValue.[ModifiedBy] ,Field.FieldDescription ,Field.Autodiscover ,Field.ModifiedBy AS 'Field ModifiedBy' ,CONVERT(NVARCHAR(MAX), Field.[ModifyTime], 20)
AS 'Field ModifyTime' ,FieldValue.[FieldId] ,FieldValue.[EnvironmentId]
FROM [Environment].[FieldValue] FieldValue LEFT JOIN [Environment].Field on Field.FieldId=FieldValue.FieldId LEFT JOIN Environment.FieldType ON FieldType.TypeId = Field.TypeId LEFT JOIN [Environment].Environment
ORDER BY 1 desc,2,3,4
Steps to Perform:
1) Navigate top K2 Workspace > Management > Management Console
2) Then expand your server > Environment Library > Templates > Default Templates > Environments > Development (as the machine the script was run on is based on a development environment)
3) Then click on Environment Fields
4) From this section locate the "SmartObject Server", select it, edit it and ensure that you tick the box for "Set as Default"
5) Now Test to see if the same issue still persists, the issue should now be fixed.