Hi!
We’re glad your problem is solved.
All the best, Daniel!
WORKFLOW: Create DocumentFolder and asign it to a parent folder.
Collapse
X
-
So funny when it happens... I've found the error just after posting.
// THIS CODE HERE WAS OK
$parentFolderId = record\findOne(
"DocumentFolder","createdAt","asc",
"name=","Arquivo Clientes"
);
// THIS WAS NOT: parentId should be used, not just parent as in the original post
record\update(
'DocumentFolder',$clientFolderId,
'parentId', $parentFolderId
);
Leave a comment:
-
WORKFLOW: Create DocumentFolder and asign it to a parent folder.
Hi there, happy AdvancedPack customer here.
I've created a workflow that creates a new folder when an account of a given type is created. Code bellow:
$clientFolderId = record\create(
"DocumentFolder",
"name", targetEntity\attribute("name")
);
$parentFolderId = record\findOne(
"DocumentFolder","createdAt","asc",
"name=","Arquivo Clientes"
);
record\update(
'DocumentFolder',$clientFolderId,
'parent',$parentFolderId
);
Code in green is working, orange is not. What I need is to have the newly created folder inside the other one (called "Arquivo Clientes", portuguese BR).
This is being done using formula because DocumentFolder doesn't appear in the drop down on Actions.Tags: None

Leave a comment: