Creating a new InfoObject with a desktop plugin

To create a new InfoObject, use the PluginMgr object's PluginInfo property to retrieve the appropriate desktop plugin. Then, create a new, empty InfoObjects collection using the NewInfoObjectCollection method, and add the plugin to the collection; this creates a new InfoObject. The following example retrieves the user group plugin, and then uses it to create a new InfoObject that represents a group. The Title property and Description property are set for the group, and the new InfoObject is committed to the APS InfoStore.

Example

var PluginMgr = IStore.PluginManager;

var UserGroupPlugin = PluginMgr.Plugininfo("CrystalEnterprise.UserGroup");

var NewInfoObjects  = IStore.NewInfoObjectCollection();

NewInfoObjects.Add (UserGroupPlugin);

var NewUserGroup = NewInfoObjects.Item(1);

NewUserGroup.Title = Name;

NewUserGroup.Description = Description;

IStore.Commit (NewInfoObjects);



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com