Clone an object and reset attribute to original default value

0
Hi! I have a question. If i create a new object (Contract) the default value of the attribute 'Einddatum' is for example 1 january 2030.  When I clone an object (Contract) which has a value of 1 june 2024, I want to change the value back to the original default value of 1 january 2030 (in the new cloned object). I know I can work with Deepclone, but that is in this case not possible, because I have associations to far away to reach within the deepclone. That's why I changed it to clone and set everything else to activities in the microflow itself.    To solve my problem I tried different things. First Create object, then clone object, then change the Einddatum value of the cloned object to the first created oject. But it still gives me the Einddatum of the object I'm cloning.  Is it somehow possible to retrieve the default value as set in my domain model? So I can use that to change my cloned object? (just retrieve object doesn't work, it doesn't give me the default value).
asked
1 answers
1

Hi Christine,

 

"When I clone an object (Contract) which has a value of 1 june 2024, I want to change the value back to the original default value of 1 january 2030 (in the new cloned object)"

 

As I understand it, you have an attribute with default value January 1, 2030 and you want the new object to also have the default value and not the value of the previous one.

 

For sure a lot of Solutions. Mine would be to :

Create a Constant with the Default Value. When cloning the Object, change the  $NewContract/Eindatum with the Constant.

 

Hope this Helps, 

 

answered