In a Blackpearl v4.6.9 environment, calling method ExecuteBulkScalar(SmartObject,SmartObjectList)
(i.e.,
SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteBulkScalar
https://www.k2.com/onlinehelp/k2blackpearl/devref/4.6.9/default.htm#../Subsystems/Default/Content/topic9531.html
)
generates an exception. Some exception details:
Message
Method 'Create' on SmartObject 'DW.LRP.SMO.CapitalBudget'. Required property 'create' value missing.
Stacktrace
at SourceCode.SmartObjects.Client.SmartObject.Validate(DataTable insertTable)
at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteScalar(SmartObject smartObject, DataTable inputTable)
at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteBulkScalar(SmartObject smartObject, SmartObjectList inputList)
at SourceCode.SmartObjects.Services.ExcelImportService.Import() in c:UsersjwarwickDocumentsVisual Studio 2012ProjectsExcelImportServiceExcelImportServiceDataExcelImportService.cs:line 307
at ScriptableImporter.Program.XLSXimport_LRPCapitalBudget() in c:UsersjwarwickDocumentsVisual Studio 2012ProjectsExcelImportServiceScriptableImporterProgram.cs:line 42
at ScriptableImporter.Program.Main(String[] args) in c:UsersjwarwickDocumentsVisual Studio 2012ProjectsExcelImportServiceScriptableImporterProgram.cs:line 21
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The call is from a SmartObject interface for a custom service broker (Mr. Fang's excellent ExcelImportService). I have used it successfully before on other, similar SmartObjects based on SQL Server Service service broker.
In the visible definition of the SmartObject (therefore the columns of the target table), there are no columns named 'create'. The documentation ( https://www.k2.com/onlinehelp/k2blackpearl/devref/4.6.9/default.htm#SmartObjects_-_Bulk_Inserts.html?Highlight=executebulkscalar ) does not seem to mention anything like that. On debug, ReferencePropertyCollection "RequiredProperties" for the "Create" method in the elements of the list of SmartObjects supplied as the second argument does not seem to contain anything like that. Any tips or advice on getting more detail or satisfying the ExecuteScalar's requirement for a 'create' property?