I have a process which I want to used to Duplicate a parent and any child references. In my BSV the children are uniquely owned by the parent. The process is below - When executing an error is thrown 'Value of ParentReference must be provided'
DUPLICATE ThisObjectives
DUPLICATE ThisObjectives.DeliverablesReference TO ThatObjectives.DeliverablesReference
I have tried some other variations to specify THATbo.attribute directly to no avail. So is this function only meant to work where the children are not owned by the parent? Or am I doing something wrong?
DUPLICATE
I have a PROCESS which duplicates my BO and multiple references for that object without a glitch.
Note: The multi reference attribute is a PEER many-one relationship. The child's matching attribute is blank (not linking back to parent)
My process,
GENERAL:
Process > Process Input > Select BO you want to duplicate (Objectives)
TEXTUAL RULES:
Rule 1 - DUPLICATE Objectives
Rule 2 - Duplicate ThisObjectives.DeliverablesReference TO ThatObjectives.DeliverablesReference
This works for me.
I guess the questions is has the DUPLICATE function got and issue with parent-child owner of relationship type?
Note: The multi reference attribute is a PEER many-one relationship. The child's matching attribute is blank (not linking back to parent)
My process,
GENERAL:
Process > Process Input > Select BO you want to duplicate (Objectives)
TEXTUAL RULES:
Rule 1 - DUPLICATE Objectives
Rule 2 - Duplicate ThisObjectives.DeliverablesReference TO ThatObjectives.DeliverablesReference
This works for me.
I guess the questions is has the DUPLICATE function got and issue with parent-child owner of relationship type?
Hi Rafa,
Cheers
I'd like to to establish if there is a bug using the DUPLICATE function first before applying this workaround.Try this:
DUPLICATE ThisObjectives
FIND Deliverables WHERE Deliverables IN ThisObjetives.DeliverablesReference
DUPLICATE Deliverables EXCEPT Owner
ThatDeliverables.Owner=ThatObjetives
I'll test this today.Anyone have this working in a owner of/ owned by relationship? Just wondering is DUPLICATE...To... is working as intended, has a bug, is missing a feature, I am making a pilot error?
Cheers
I have successfully duplicated Company BO with Contacts but did get an 'Value of ParentReference must be provided' error.
The ParentReference attribute in the Contacts object had the "Value must be provided' checkbox ticked.
Once I un-ticked the checkbox, the Company object and Contacts were duplicated.
Support, is the 'Value must be provided' checkbox ment to be omitted by AIM when DUPLICATE function is performed?
The ParentReference attribute in the Contacts object had the "Value must be provided' checkbox ticked.
Once I un-ticked the checkbox, the Company object and Contacts were duplicated.
Support, is the 'Value must be provided' checkbox ment to be omitted by AIM when DUPLICATE function is performed?
DUPLICATE function works as intended as long as 'Value must be provided' in child references for the parent Object is un-checked.
Maybe this re-write of Rafa's process might work as an alternative.
Duplicates the current original Objective in context. 'This' prefix is not required.
FIND Deliverables WHERE Deliverables IN ThisObjetives.DeliverablesReference
Duplicates the found Deliverables
Maybe this re-write of Rafa's process might work as an alternative.
DUPLICATE ObjectivesDUPLICATE ThisObjectives
Duplicates the current original Objective in context. 'This' prefix is not required.
FIND Deliverables WHERE Deliverables IN ThisObjetives.DeliverablesReference
DUPLICATE ThisDeliverables EXCEPT OwnerDUPLICATE Deliverables EXCEPT Owner
Duplicates the found Deliverables
INSERT ThatDeliverables IN ThatObjectives.DeliverablesReferenceThatDeliverables.Owner=ThatObjetives
Solved Using BATCHES OF. As previously noted this only applies to DUPLICATE-ing References when they are OWNED BY another BO, and the value of the child to parent where VALUE MUST BE PROVIDED is true
One issue - if you want to show the newly copied record to the user after it is created you must create a second process and store a value to RegualrUser to act as a variable input for the second process. I do not know why VIEW does not work with the above, the log show it successfully executing, however the screen does not update.
So a little cumbersome, but functional. It would be nice to know why VIEW will not work in a single process and I still think DUPLICATE TO should support OWNED BY and VALUE MUST BE PROVIDED, but I have what I need for now. Thanks all for the help!
Code: Select all
DUPLICATE ThisObjectives
LoggedInRegularUser.Variable_CopyID=ThatObjectives.ID
FIND Deliverables WHERE Deliverables IN ThisObjectives.DeliverablesReference IN BATCHES OF 1
DUPLICATE Deliverables
ThatDeliverables.ParentReference=ThatObjectives
Code: Select all
Proecess #1
DUPLICATE
DUPLICATE ThisObjectives
LoggedInRegularUser.Variable_CopyID=ThatObjectives.ID
FIND Deliverables WHERE Deliverables IN ThisObjectives.DeliverablesReference IN BATCHES OF 1
DUPLICATE Deliverables
ThatDeliverables.ParentReference=ThatObjectives
VeiwRegualrUser_VariableCopyID
Process #2
FIND Goals WHERE Goals.ID=LoggedInRegularUser.Variable_CopyID
VIEW Goals
ugh... why can't we EDIT our own @#$%$%$ forum posts...
The above first sentance should read:
Solved Using BATCHES OF. As previously noted this only applies to DUPLICATE-ing Reference lists when the the Relationship is OWNED BY another bo AND the VALUE MUST BE PROVIDED option is true AND the MULTIPLE ALLOWED option is false
The above first sentance should read:
Solved Using BATCHES OF. As previously noted this only applies to DUPLICATE-ing Reference lists when the the Relationship is OWNED BY another bo AND the VALUE MUST BE PROVIDED option is true AND the MULTIPLE ALLOWED option is false