Xpages - How to access the newly generated UniversalID and send it on submit in Xpages
<p>I want to be able to send the UNID of the newly created document to the user, so that the user can access the document. In the execution script;</p>

<pre><code>var unid = param.documentId;
var vUnid = newDocId.getDocument().getUniversalID;
</code></pre>

<p>Both were picking up the parent UNID, which already existed in the browser.</p>

<p><a href="https://i.stack.imgur.com/9QIbN.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/9QIbN.jpg" alt="enter image description here"></a></p>

<p>This image will show you how the document looks like and will be grateful to know how to pass the newly generated UNID when document is submitted.</p>