Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DueDate field data type parsing #64

Open
gregarican opened this issue Sep 2, 2020 · 4 comments
Open

DueDate field data type parsing #64

gregarican opened this issue Sep 2, 2020 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@gregarican
Copy link
Contributor

A few JSON response body parsing exceptions seem to occur when handling the due_date field. These specifics files seem to have been affected.

public DateTime? DueDate { get; set; }

Models/Request/ActivityUpdate.cs
Models/Response/Activity.cs
Models/Response/DealActivity.cs

Testing out an API request/response pair accordingly might shed some light on this. In my own forked project I changed the data type to string and had more consistent parsing results.

@DavidRouyer
Copy link
Owner

Are you using the latest version? I've updated my integration tests for the creation/update of the activity and it's working fine 4217709

@DavidRouyer DavidRouyer self-assigned this Sep 2, 2020
@DavidRouyer DavidRouyer added the bug Something isn't working label Sep 2, 2020
@gregarican
Copy link
Contributor Author

Another comment about this. Previously if my code updated a deal (e.g. - change its status) the only other field value I had to provide in my update dataset was the deal's dollar value. The other fields remained unchanged after the API request was fulfilled. You'd expect that any fields not passed into the method properties would be ignored. Which was the case.

When I compiled v0.53.0 against my project and ran it last night I found that the expected_close_date field is nulled out when I issued the same deal update API requests I have been. So now I am trying adding that date to the update dataset to ensure it's retained after the API request is fulfilled.

@DavidRouyer
Copy link
Owner

The correct way to update an entity is to do like that:

  var deal = await client.Deal.Get(dealId);
  var dealToUpdate = deal.ToUpdate();
  //dealToUpdate.StageId = stageId; The fields you want to update
  await client.Deal.Edit(deal.Id, dealToUpdate);

@gregarican
Copy link
Contributor Author

Ahhh, I see now. After I hit this I then assumed that I would need to pull in the existing deal as a reference point to fill out the update. Thanks for the clarification!

@DavidRouyer DavidRouyer added question Further information is requested and removed bug Something isn't working labels Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants