I've created an object Document that inherits from System.FileDocument. This object can contain two types: A file upload / download A link to a website I've used an enumerator to be able to select the type of document (Link or Upload). I've implemented a templategrid. This should display a list of object Document. If the object in the grid is a link, I would like to be able to click something (hyperlink/button) to open the URL. If the object in the grid is a FileDocument, I would like to be able to click something (hyperlink/button) to download the file. Restrictions: I cannot use conditions on rows in tables used in a template grid (so I cannot conditionally display the link or the download) I cannot create a microflow, that conditionally opens an URL or downloads a file. How do I create a grid that enables me to open URL's or download files directly from the grid (without having to click somewhere else after I selected the row in the grid)?
You could add a virtual attribute to the object you are displaying, which returns the URL of either the file, or the URL itself. The Url of a file is
'/file?fileID=' + $fileDocument/FileID
Use this attribute in combination with an external link widget.