I am trying to convert the ps to vb, but run into trouble, when creating the parameter array object.
The .Items is nothing, which causes a runtime error. What am I missing here?
Dim iCustEnt(0) As Long
iCustEnt(0) = connection.WebServiceManager.CustomEntityService.AddCustomEntity(3, "My great custom object").Id
Dim oParams(0) As PropInstParamArray
oParams(0) = New PropInstParamArray
For Each oPropDef As PropDef In connection.WebServiceManager.PropertyService.GetPropertyDefinitionsByEntityClassId("CUSTENT")
If oPropDef.DispName = "CC GroupId" Then
Dim oPropParam As New PropInstParam
oPropParam.PropDefId = oPropDef.Id
oPropParam.Val = "myVal1"
Dim i As Int16 = oParams(0).Items.Count ' Fails in this line
oParams(0).Items.Append(oPropParam)
End If
Next
connection.WebServiceManager.CustomEntityService.UpdateCustomEntityProperties(iCustEnt, oParams)
-------
Before spending too much time on this track, I would like to know if using CustomObjects is a good idea? Asking because it seems the api is unsupported.
I want to use the Vault list to control the jobprocessor. ie, when a custom object is approved, it should trigger the JobProcessor to start an action.
Instead of using a Custom Object, I could also just use a folder with "dummyfiles", as the API to handle files looks more mature?
Thanks in advance.