Quantcast
Channel: Questions in topic: "api"
Viewing all articles
Browse latest Browse all 21

How to create Work Log via API?

$
0
0
I've been following the C# examples in the AxosoftAPIExample. Below is the code I'm trying to use to created a work log entry. I have included every required field posted in the API documentation, but every time I try to run the code I get a null reference exception. I think the null reference exception occurs because WorkLog has not initialized. Looking on the other examples in the API Example I'm not sure how I would initialized WorkLog. > Datetime wlDateTime = DateTime.Now; > var newWorkLog = axosoftClient.WorkLogs.Create(new WorkLog > { > Item = > { > ItemType = "defects",> Id = 31, > RemainingDuration => {> Duration = 30,> TimeUnit = { Id = 2 },> },> },> WorkDone = > {> Duration = 8, > TimeUnit ={Id = 2},> },> User ={ Id = 100},> WorklogType = { Id = 1},> Description = "This work log was created from the API", > DateTime = wlDateTime,>> });

Viewing all articles
Browse latest Browse all 21

Trending Articles