Monday, January 16, 2012

Updating the mime type property of the doucments in Filenet

When we need to update the properties of the large number of documents  in Content Engine, Filenet provides the script execution option for bulk updates. The scripts are executed using Filenet Enterprise Manager. This option is provided in the search functionality so that we can search the documents based on conditions and update only those articles. This makes developer or support engineer job is easy. Custom property updates generally doesn't require the checkout and checkin of the documents. We can directly update the properties using the script. We can use the below code to update the property.


When I tried the above code to update the mime type property it is not working and I found out that it is a read only property and to update the read only properties like mime type we need to checkout the document and before checkin the document we need to update the property. So I have updated the above scrip as mentioned below.

CEObject.Reservation.Properties("mimetype").Value= "text/html"

After executing the above script I have observed that the mime type property updated as expected and document version also upgraded but the content of the document is missing. While checkin the document we need to pass the content otherwise it will save the empty document. So I have written a script to get the document content and saved to the local folder and while check-in the document i have added the content. 

CEObject.CopyContent "file:///localfoldername/filename"  
CEobject.Reservation.Properties("MimeType")= "text/html"   
CEObject.Reservation.Checkin "foldername\filename"

The above code is used to checkout the content and saved to the local folder and update the mime type property and checkin the content from local folder.



  1. I found the solution on your blog! Nice Naveen! Again you help me to solve the issue. :)


  2. This blog is really very help ful....
    Thanks Naveen, please keep it active

  3. Nice work.
    How do you blank a date metadata property?
    I've managed to set a date to 1/1/1900, but ideally I'd like to make it a null value.

  4. Does any way FileNet support helps in modifying a data or documents in the Filenet?

  5. Where i can find all actions list with CEObject? I want do unfile from current folder, delete current folder and file in folder - successively.


How to find the WAS Console Port Details from the Server

In WAS Server go to the below path <WebSphere Installation Path>/Profiles/<Dmgr profile name>/logs You can see the below fi...