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.