on 06-06-2011 10:17 PM
Hi,
I'm writing some code to modify the description of a folder. Every time the folder is updated, a new object is being created. Can someone tell me why this is happening?
var infoStore = BOWrapper.InfoStore;
var query = new StringBuilder("SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND='Folder' AND SI_ID=").Append(folder.Id);
InfoObjects infoObjects = infoStore.Query(query.ToString());
InfoObject infoObject = infoObjects[1];
PluginManager pluginManager = infoStore.PluginManager;
PluginInfo pluginInfo = pluginManager.GetPluginInfo("CrystalEnterprise.Folder");
infoObjects.Add(pluginInfo);
infoObject.Title = folder.Title;
infoObject.Description = folder.Description;
infoStore.Commit(infoObjects);
This also happens when I update a user. Is it something to do with the infoStore.Commit(infoObjects) statement?
Thanks
James
The code below is saying to add a folder object
PluginManager pluginManager = infoStore.PluginManager;
PluginInfo pluginInfo = pluginManager.GetPluginInfo("CrystalEnterprise.Folder");
infoObjects.Add(pluginInfo);
Not sure why you have that in there since you don't need this code to modify an existing object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.