Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3022

Copy webi report or object from folder to another fails

$
0
0

We had .NET SDK Code that was working in 3.1 but seem to be running into few issues with some methods in 4.1 .

One example was copying a report or an object from one folder to another . It throws an error : File Repository Server Error

 

Below is a code snippet and also attached the whole code.

 

While debugging the code fails at red.

 

                    if (sourceObject.Kind == "Webi")
  query = "Select SI_ID,SI_CUID,SI_NAME,SI_DESCRIPTION,SI_UNIVERSE,SI_FILES FROM CI_INFOOBJECTS WHERE SI_ID = " + sourceObject.ID.ToString();
                      
                    else
                     query = "Select * FROM CI_INFOOBJECTS WHERE SI_ID = " + sourceObject.ID.ToString();

                    InfoObjects boInfoObjectsToCopy = GetInfoStore(infoObj).Query(query);

 

foreach (CIRTInfoObject destinationObject in Destination)
                            {
                                InfoObject infoObject = boInfoObjectsToCopy[1];
                  InfoObject infoObjectCopy = boInfoObjectsToCopy.Copy(infoObject, CeCopyObject.ceCopyNewObjectNewFilesKeepFileName);

                                infoObjectCopy.ParentID = destinationObject.ID;
                                GetInfoStore(infoObj).Commit(boInfoObjectsToCopy);
                                response.IsSuccessfull = true;
                            }

 

 

I'm attaching the code. Any thoughts appreciated.



Viewing all articles
Browse latest Browse all 3022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>