• No replies
1 Post

Pinned topic File not retrived in GetCachedFile() method

‏2011-09-13T08:30:19Z |

We are using the Filenet IDMobjects to retrive the document from filenet. After the successful login we were using the IDM generic object GetObject() to retrive the document, we were passing the storageId as one of the parameter to GetObject() method.
In next step, GetCachedFile() method is called to retrive the document. We need only one document so '0' is passed as the parameter to GetCachedFile().
Once the file is retrived the varible tempFilePath should have the filepath(IDM/cache location) as the value.


Sometimes GetCachedFile() method is not returning any values and the variable tempFilePath contains null.
we are not getting any errors at GetcahchedFile() line, actually we are not getting the filepath.

since tempFilePath value is null its not satisfied in the IF condition and moving to ELSE condition.

Pasted somepart of code which we are using:

IDMObjects.IFnDocumentDual idmDocObj;
idmDocObj = (IDMObjects.Document)idmLibObj.GetObject(IDMObjects.idmObjectType.idmObjTypeDocument, storageId, Missing.Value, Missing.Value, Missing.Value);
if(page == 1)
string tempFilePath = idmDocObj.GetCachedFile(0, "", Missing.Value);
if (File.Exists(tempFilePath))

throw ex;

Very often we are facing this issue. Please help us with any solutions

Sathish Kumar Mohan