Sachin - Saturday, June 2, 2012 4:30 AM:
Hello,
I have Image file(Paint) attached to the document.
I want to view that image file. When i click on edit button (Custom Button) on the form.
Sachin G
Boro - Tuesday, June 5, 2012 1:55 AM:
Hello,
If you want to just viewing a file, you can try following code.
Create a new method, and set onclick event on your custom button.
---
var thisItem = document.thisItem; //get this item
var relItems = thisItem.getRelationships("Document File"); //get relationship items
var fileItem = relItems.getItemByIndex(0).getRelatedItem(); //get related item from first relationship item
top.aras.uiShowItemEx(fileItem.node, undefined, true); //show file on window
---
In this case, it shows the first file item. I think you need to write additional code.
Furthermore, there are many methods of showing a file item. It is only a sample.
Thanks