I'm using the following code to update the email address for a company contact -
`$type=@{ "value"="bucket@company.com";
"domain"="@company.com";
"communicationType"="Email";
"defaultFlag"="true";
"type"="";
}
which is the closest I've got, but get
An exception has been thrown. --> Response status code does not indicate success: 400 (Bad Request). An error
| has been thrown. --> --> { "code": "InvalidPatch", "message": "Could not cast or convert from System.String
| to ConnectWise.Apis.v3_0.v2015_3.Company.Contact.ContactCommunicationItem[]." } at Invoke-CWMWebRequest,
Using 0.4.11.0
Any ideas on what I need to update here? I've removing type, default flag etc so i'm left with just the communicationType and value but still get the same error message
I'm using the following code to update the email address for a company contact - `$type=@{ "value"="bucket@company.com"; "domain"="@company.com"; "communicationType"="Email"; "defaultFlag"="true"; "type"=""; }
$jsontype=convertto-json $type
update-cwmcontact -id 33463 -operation replace -path communicationItems -value $jsontype`
which is the closest I've got, but get An exception has been thrown. --> Response status code does not indicate success: 400 (Bad Request). An error | has been thrown. --> --> { "code": "InvalidPatch", "message": "Could not cast or convert from System.String | to ConnectWise.Apis.v3_0.v2015_3.Company.Contact.ContactCommunicationItem[]." } at Invoke-CWMWebRequest,
Using 0.4.11.0
Any ideas on what I need to update here? I've removing type, default flag etc so i'm left with just the communicationType and value but still get the same error message