Error when use function document()

Certified Associate Developer

In my interface, I user function document.

if(
                            document(tofolder(local!documentId), "size") > 0,
                            true,
                            false
                          )

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to ujjwalrathore

    I do love the "getcontentobjectdetailsbyid()" rule for this though, because it can help us *specifically* distinguish between an already-uploaded file versus a newly-uploaded file.  Here's the expression rule I have set up for such a purpose (the "docExists" rule that gets called first just makes sure the doc ID is non null, non zero, and runs the "objectExists()" rule on it first)...

    and(
      rule!ENV_UTIL_docExists(ri!doc),
      find(
        "State: Active Published",
        getcontentobjectdetailsbyid(ri!doc)
      ) > 0
    )

Children