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;
var unid = param.documentId;
var vUnid = newDocId.getDocument().getUniversalID;
Both were picking up the parent UNID, which already existed in the browser.
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.