I have a list of Ids I need to check wheather document is exists or not - isobjectexist function is not availble in the community is there any alternate function please help me
Discussion posts and replies are publicly visible
Hi JPotharaju you can try getcontentobjectdetailsbyid() this function.when you pass id into it , it would return all the context of it else it would retrun No object with this ID has been found"
I design my apps in a way that I never get into such a situation. I store the document ID + some meta data into a database table. If I delete a document, I delete that row in the DB & the document.
Hi JPotharaju , isobjectexist is a plugin it will be available only when you deploy in Community. FYI, In Admin console just go through Plug-ins and click on add new plug-in, then search with Check Object Existence , deploy it. Now you will able to access that plugin in community.
If you are able to see that plugin, try like below it will solve ur problem.
reject(
a!isNullOrEmpty(_), a!forEach( items: ri!Documents, expression: if( isobjectexists( typeOfObject: "Document", objectId: fv!item ), fv!item, null ) ))
issue with this getcontentobjectdetailsbyid() - Scenario - document is not there with id but we may have other object with the same id we will get that context right
You can use the result of getcontentobjectdetailsbyid() to todocument() function to check whether the object is document or not.