Closed LeeStevens318 closed 1 year ago
I'm running into an issue where I can create: Contacts, companies, deals. But I cannot create DealHubSpotAssociation
@aronsimpletix you should be able to map associations during creation:
// Removed invalid code - see response below.
Hi Lee
Associations was not in the properties. Did you add it to your code?
On Tue, Feb 22, 2022 at 4:10 PM LeeStevens318 @.***> wrote:
@aronsimpletix https://github.com/aronsimpletix you should be able to map associations during creation:
// Map Deal to HubSpot Model var hubSpotDeal = new DealDto { Id = deal.Id, Name = deal.Name, Stage = deal.Stage, Pipeline = deal.Pipeline, OwnerId = deal.OwnerId, CloseDate = deal.CloseDate, Amount = deal.Amount, DealType = deal.DealType, JobNumber = deal.JobNumber.ToString(), Location = deal.Location, Vertical = deal.Vertical, CreatedBySync = deal.CreatedBySync, CreateDate = deal.CreateDate.ToString(), Associations = { AssociatedCompany = new [] { deal.CompanyId } } };
— Reply to this email directly, view it on GitHub https://github.com/hubspot-net/HubSpot.NET/issues/84#issuecomment-1048214656, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPJPMQ4Z73MAJ55BFJS6H3U4P3UVANCNFSM4O33JAJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Hi @aronsimpletix, yeah sorry i was just editing my response. I realised this was on the old package i used i switched to: https://github.com/skarpdev/dotnetcore-hubspot-client
That’s weird, the old package is better than the new one?
On Tue, Feb 22, 2022 at 4:13 PM LeeStevens318 @.***> wrote:
Hi @aronsimpletix https://github.com/aronsimpletix, yeah sorry i was just editing my response. I realised this was on the old package i used i switched to: https://github.com/skarpdev/dotnetcore-hubspot-client
— Reply to this email directly, view it on GitHub https://github.com/hubspot-net/HubSpot.NET/issues/84#issuecomment-1048217011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPJPMXRW3QNOE2TN5PS5RLU4P4ARANCNFSM4O33JAJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Describe the bug When pulling a list of Deals and settings the "includeAssociations" as true it's not populating the associations.
When querying the API directly the information is retrieved:
URL:
https://api.hubapi.com/deals/v1/deal/paged?hapikey=KEY_HERE&offset=100&includeAssociations=true&limit=2&properties=job_no
Repro Steps
AND Deal Class
Expected behavior Associations shouldn't be null