0

I am working with FileNet API and I can create document's attachments correctly. First, I create the document in the CE and later i connect the new pid in the PE.

Here it is the core of my code.

//update mode
parameter.Modified = true;

//Attchment creation
attachment = new peWS.Attachment();
attachment.LibraryType = peWS.LibraryTypeEnum.LIBRARY_TYPE_CONTENT_ENGINE;
attachment.Type = peWS.AttachmentTypeEnum.ATTACHMENT_TYPE_DOCUMENT;
attachment.Id = version_series; 
attachment.Version = null;
attachment.Library = obj;
attachment.Name = System.IO.Path.GetFileName(path);
attachment.Description = description;


//value updates  
list_values = parameter.Values.ToList();
val.ItemElementName = peWS.ItemChoiceType.attachmentField;
val.Item = attachment;
list_values.Add(val);
parameter.Values = list_values.ToArray();

//save
peWS.UpdateStepRequest updStepRequest = new peWS.UpdateStepRequest();
peWS.UpdateFlagEnum updFlagEnum = peWS.UpdateFlagEnum.UPDATE_SAVE_UNLOCK;
updStepRequest.stepElement = stepElement;
updStepRequest.updateFlag = updFlagEnum;
peWSClient.updateStep(updStepRequest);

It works correctly and if I loop the attachments I can manage them (show, update, delete). The problem is in the front end tool Navigator: i see the added attachments but the first one is always unreadable. I can't even click on it because it is enabled by Navigator itself.

It does not seem a code problem, but maybe i am missing some tricky parameter. Could someone help?

1 Answer 1

0

I found a solution of the problem that i posted. It was a Navigator's bug of the version that i was using. If I update Navigator at the 2.0.2. version it will work just fine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.