05-27-2021 07:39 AM
Hi, I want to get a file from an existing document (Type: New-Workspace) and to attach it to another document (Type: Project) using an automation chain ( Please see attached document) when I create a new project I receive an error message (Please See attachment : console ) Could you please help me to find possible causes Thankyou
05-27-2021 08:35 AM
Hello,
Your error is server side, so the browser logs don't help a lot. I really not recommend using automation chain for this use case, it makes things complex. You'd better go with automation scripting. It should be something like this:
function run(input, params) {
var parent_doc = Document.GetParent(
input, {
'type': "New-Workspace"
}
);
var file = Document.GetBlob(
input, {
/*required:false - type: string*/
'xpath': "file:content"
}
);
Blob.AttachOnDocument(
file, {
/*required:true - type: document*/
'document': input,
/*required:false - type: boolean*/
'save': true,
/*required:false - type: string*/
'xpath': "project:logo"
}
);
return input;
}
It feels strange to get a blob from a doctype called "New-Workspace" BTW
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.