Symptoms
Using Package and Deployment to deploy a package a form from Development to Staging, the next error is thrown:
The error reads:
The SmartObject Instane or one of its components could not be resolved.
Error Details: ServiceObject definition does not contain method. ServiceObject : Table].
Method : Create]
•Type: System.Exception
•Source: SourceCode.HostServerLib
•Stack Trace:
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Object ] Parameters, BooleanB] NullList, MarshalMessageType CallType)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteCall(String TypeName, String MethodName, Object ] Parameters, BooleanB] NullList, MarshalMessageType CallType)
at SourceCode.SmartObjects.Client.SmartObjectClientServer.GetSmartObject(Guid guid)
at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(XPathNavigator nav, Boolean outputDependencies, SmartObjectClientServer svr)
Diagnoses
The error indicates that the Method "Create" was missing on the Target SmartObject.
Resolution
After comparing both Source and Destination Databases, we noticed that the table referenced in the error was missing all the CRUD methods. This was because there was no Primary Key set. After creating the Primary Key and refreshing the service instance the error went away. We had a similar issue with another Table, but in this case there was a Missing Column. After adding the column to the table and recreating the SMO we were able to successfully load the form.