Hi,
I want to disable document link from read only grid if document is not exists or deleted from document folder.I am using following code to show and download document from read only grid.
a!gridColumn( label: "File Name", value: a!linkField( links: a!documentDownloadLink( label: index(fv!row, "myFileName", {}), document: index(fv!row, "appianDocId", {}) ) ) )
Please Suggest me any solution for this.
Discussion posts and replies are publicly visible
For the past several years at least, I have strongly recommended that developers not use a!linkField() ... for anything, really. Instead, use a!richTextDisplayField() which includes far more functionality and flexibility. Within a!richTextItem, you can dynamically set a link with a showWhen parameter, and control what the text says (and its formatting) for different scenarios. Pair this with functionality to check whether the doc ID is still valid (though I share Stefan's concern that you're deleting documents without updating the Database).
I forget (off the top of my head) whether there's an OOB function to check document existence based on ID, but one available plug-in is "Check Object Existence" which contains one simple rule that you pass an ID to and it returns TRUE or FALSE.