Skip to content

Requesting a document (persistent.getDocument)

You can use persistent.getDocument to get a document with a specific documentId

You can use the following method in your script

persistent.getDocument(ddName, documentId);
Parameter Type Required Description
ddName String Yes The name of the document definition. If the value is null, BizzStream will use the name of the document from which the script was started.
documentId String Yes The BizzStream (internal) ID of the document you request. Find out how you can find this ID here.


The following method allows you to search for the project with the BizzStream ID 2FwMgqxxPv6i4j8rc.

persistent.getDocument("project", "2FwMgqxxPv6i4j8rc");

The result is the following document, for example:

   "name":"Constructing Highway",

Tip: by using the console console.log('a message', variable) you can find the result in the logs.

//Start of the script
var document = persistent.getDocument("project", "2FwMgqxxPv6i4j8rc");
console.log('Give me the document with id 2FwMgqxxPv6i4j8rc', document)
//End of the script


The persistent.getDocument method is subject some limits. Click here to find out more.