Check weather document exists or not

Certified Lead Developer
Hi,

I want know weather document is available or not by taking document id. If I pass an id to document() function it will give error if the document is not available.
Any suggestions?.

Thanks.

OriginalPostID-239244

  Discussion posts and replies are publicly visible