How to add contact to deal?
Closed this issue · 2 comments
aramhai commented
How to add contact to deal?
when i create deal i cant add contacts Because "Associations" in "DealHubSpotModel" is read only, so i cant set contacts.
so... how i can add contact to new deal?
aramhai commented
I solved it!
var test = new DealHubSpotModel()
{
Amount = 10000,
Name = "New Deal #1",
Stage = "closedwon",
};
test.Associations.AssociatedContacts = new[] { contact.Id.Value };
DealHubSpotModel deal = CreateApi().Deal.Create(test);
return deal;