cancel
Showing results for 
Search instead for 
Did you mean: 

CopyService not quite working

former_member540174
Participant
0 Kudos

I have two value nodes with matching elements - AttendanceEntry and AttendanceTemp - cardinality is 0..n. I am wanting to copy all the data from Entry to Temp (my example has 38 items in it). I have tried the following code. Both versions the AttendanceTemp contains zero entries.

Did I do something incorrect?


wdContext.nodeAttendanceTemp().createAttendanceTempElement();
try
{
	WDCopyService.copyCorresponding(wdContext.nodeAttendanceEntry(),wdContext.nodeAttendanceTemp());
}
catch (Exception ex)
{
 // TODO Catch
}

didn't work so then I tried


wdContext.nodeAttendanceTemp().createAttendanceTempElement();
try
{
	WDCopyService.copyElements(wdContext.nodeAttendanceEntry(),wdContext.nodeAttendanceTemp());
}
catch (Exception ex)
{
 // TODO Catch
}

Thoughts?

Regards,

Diane

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In the catch block try to print the exception using:

wdComponentAPI.getMessageManager().reportException(ex.getMessage(),true);

This might give us a hint what is going wrong.

Regards,

Murtuza