Developer Q&A
Error adding TimeCardItem - Please help urgently!
Hi,
It's been over 10 days with this case open. I am sorry to bug, but this has become now an emergency for our project, and I don't see any reaction around this case. We are about to go live with version 9.7 and this issue is in the critical path of the project.
We are trying to add TimeCardItem to a TimeCard but get error: "TimeCard is a required field"
These are our steps:
We invoke GetTimeCardCommand to get a TimeCard instance.
Dim tc As New corrigoEnterprise.GetTimeCardCommand()
tc.BaseDate = "2021-11-20T13:00:00"
tc.EmployeeId = 50
Dim resTC As TimeCardActionResponse
resTC = corrigoService.Execute(tc)
Then we build the TimeCardItem
Dim tci As New corrigoEnterprise.TimeCardItem
tci.TimeCard = resTC.TimeCard;
<... and we complete all required fields of object tci ...>
Finally we execute passing the timeCardItem instance as cmd.entity:
Dim cmd As New CreateCommand()
cmd.Entity = itm
Dim resTCI = corrigoService.Execute(cmd)
We get the following error: "TimeCard is a required field"
Considering that our object could be improperly built, we fetched one TimeCardItem, modified StartDate, EndDate, ConcurrencyId=0, and Id=0, and executed an insert command with this object, totally valid from Corrigo. We am getting the same error: "TimeCard is a required field".
Please help.
Thank you!
Juan