Skip to Content
0
Former Member
Jul 14, 2016 at 06:23 PM

Trying to load an Agnostic File (ZIP) to CMS

71 Views

Hi Folks, I'm relatively new to Business Objects and especially SDK development. I have a requirement to load ZIP files into the CMS (long story).

This is the VB script I've written. It works until it hits the oInfoStore.Commit(oInfoObjects) line. Then I get this error:

Any suggestions will be appreciated.

Ralph

''Script

Set oSessionManager = CreateObject("CrystalEnterprise.SessionMgr")

Set oSession = oSessionManager.Logon(oUserName, oPassword, oAPSName, oAuthType)

Set oInfoStore = oSession.Service("","InfoStore")

parentFolderID = 28798 ' Already exists and is hard coded for now

zipFile = "D:\Test\Test.ZIP"

SET oInfoObjects = oInfoStore.newInfoObjectCollection()

Set pluginAgnostic = oInfoStore.PluginManager.PluginInfo("Agnostic")

Set newObject = oInfoObjects.Add(pluginAgnostic)

newObject.Files.Add(zipFile)

newObject.parentID = parentFolderID

oInfoStore.Commit(oInfoObjects)

Attachments