Hi,
Please find below my code to post parameters for a Business Component. I am getting the "Failed to post simple key entity" error. I have already tried the solution of changing vbNull to NULL. Any help will be appreciated. Thanks in advance. The error happens in the line objQcComponentParam.Post"
Weird thing is that this works in one environment and it does not work in another. :(
Dim objQcComponentFolder : Set objQcComponentFolder = objQcComponentFolderFactory.FolderByPath(strComponentPath)
Dim objQcComponentFactory : Set objQcComponentFactory = objQcComponentFolder.ComponentFactory
Dim objQcComponent : Set objQcComponent = objQcComponentFactory.AddItem(Null)
objQcComponent.Name = strComponentName
objQcComponent.Field("CO_DESC") = strComponentDescription
objQcComponent.ScriptType = "QT-SCRIPTED"
HandleComponentDuplication objQcComponent, strComponentName, strComponentDescription
Dim objQcComponentParamFactory : Set objQcComponentParamFactory = objQcComponent.ComponentParamFactory
Dim strComponentParameter, objQcComponentParam
For Each strComponentParameter In garrComponentParameters
Set objQcComponentParam = objQcComponentParamFactory.AddItem(Null)
objQcComponentParam.IsOut = 0 '0 implies False
objQcComponentParam.Name = strComponentParameter
objQcComponentParam.Desc = strComponentParameter
objQcComponentParam.ValueType = "String"
objQcComponentParam.Order = 1
objQcComponentParam.Post
Next
objQcComponent.Post