I'm trying to link 2 documents ( Cdoc
and Pdoc
) based on the Cdoc UNID
.
I have a computed field ( computedfield3
) which is binded to a form'computed field having the default value @text(@documentuniqueid)
. The Pdoc
is inside a dialog which I show it using a button.
The button contains a Partial Update
for ID:computedField3
.
The button code:
if ( Cdoc.isNewNote() ) { Cdoc.save();
Cdoc.setValue("computedField3",Cdoc.getDocument().getUniversalID());
getComponent('exampleDialog').show() }
else
{
Cdoc.setValue("computedField3",Cdoc.getDocument().getUniversalID());
getComponent('exampleDialog').show()}
Then I pass the computedField3
value to Pdoc
using custom control properties.
I noticed if I opened an existing already saved Cdoc
, open it and add again a Pdoc
from the dialog, the existing UNID from the Cdoc
is changing... Is from the partial update?
How can I make it OK ?
Thanks for your time