i link: a!documentDownloadLink(document: fv!item.appianDocId ),
used the above two lines to download a document but it does not download , it open a tab with a message error : { "error": "APNX-1-0000-000", "message": "Invalid Content ID", "title": "An Error Has Occurred"}
Discussion posts and replies are publicly visible
Hey, the format for utilizing the document download link is as follows:
a!linkField( label: "Link", labelPosition: "ABOVE", links: { a!documentDownloadLink( label: "Document Link", document: 8552 /* document id */ ) } )
Is that value in appianDocId a valid document id?
Yes it seems like it's saving the appianDocId in the database correctly
You just shared this minimal code snippet. I cannot help you much without more context.
Did you check the actual values in that data you seem to iterate on?
Did you try doing todocument with that docId in an expression rule?
This issue suggests that the content ID used for document retrieval may be incorrect or invalid, leading to the unsuccessful download attempt.While looking for an essay writing service, I discovered the Trust My Paper website. This site became a valuable resource in my quest for the Write My Lab Report that suits my needs. It simplified my search by providing insights into reliable tools, making the process of finding the right one much easier. With its helpful information, Trust My Paper turned out to be more than just a service provider; it became a guide in navigating the plethora of online resources available for generating effective.
look like that appianDocId is not exist or deleted.
Try to search that is in objects with type UUID or ID. Im sure you will not find that.
It seems the object you are trying to download does not exists in appian. So before passing the documentID to a!documentDownloadLink() function better to check the exitance of document in Appian using following functions:
isobjectexists returns true if object exists in Appian.
isobjectexists( "Document", /*documentID*/)
getcontentobjectdetailsbyid will return all the content of the object.
getcontentobjectdetailsbyid( /*documentID*/)
a!gridColumn( label: "Download Doc", value: a!richTextDisplayField( value: a!richTextIcon( icon: "download", link: a!documentDownloadLink( label: document( fv!row['recordType!recordTypeName.fields.documentId'], "name" ), document: todocument( fv!row['recordType!recordTypeName.fields.documentId'] ) ) ),
), align: "CENTER", width: "1X" )
Hi , try to check with the above code