How to reset some attributes on duplicate of entity

Avatar

Avatar
Springboard
Level 1
emil_rowland
Level 1

Like

1 like

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Springboard
Establish
Validate 1
Give Back
Ignite 1
View profile

Avatar
Springboard
Level 1
emil_rowland
Level 1

Like

1 like

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Springboard
Establish
Validate 1
Give Back
Ignite 1
View profile
emil_rowland
Level 1

22-05-2020

Hi,

 

In a form how do I handle the first save if some one duplicates the entity?

I have some attributes that needs to be reset when someone copies/deduplicate the entity. Now when I duplicate the entity all attributes is being passed to the new entity.

 

//Emil

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile
Adhiyan
Employee

08-06-2020

Hello Emil,

 

You should use the defOnDuplicate="true" or "false" in the schema which holds the entity .

The defOnDuplicate function if set to true , uses the default value of the schema instead of the stored value in the record being duplicated.

 

Examples can be found in the nms:delivery OOB schema like :

<attribute defOnDuplicate="true" desc="Start date if action is deferred or delayed, validity date otherwise."
label="Contact date" name="contactDate" type="datetime"/>

 

Regards,
Adhiyan

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 100
MVP
_Manoj_Kumar
MVP

Likes

117 likes

Total Posts

329 posts

Correct reply

102 solutions
Top badges earned
Affirm 100
Validate 1
Contributor
Ignite 1
Shape 1
View profile

Avatar
Affirm 100
MVP
_Manoj_Kumar
MVP

Likes

117 likes

Total Posts

329 posts

Correct reply

102 solutions
Top badges earned
Affirm 100
Validate 1
Contributor
Ignite 1
Shape 1
View profile
_Manoj_Kumar
MVP

22-05-2020

Hello @emil_rowland 

 

Can you please share more details like some screenshot of webForm/ Input form?