Good morning everyone,
I'm running a code that creates a new contact in MSCRM, but when trying to create I get the following message Exception
"A failure protected incorrectly or not protected was received from the other party. See internal FaultException for details of the fault code."
What can it be? Below the code I'm using.
try
{
else
{
conexaocrm string = "Url = http: // intranet: 5555 / Training: Username = admin, password = admin @ 15";
Microsoft.Xrm.Client.CrmConnection connection = Microsoft.Xrm.Client.CrmConnection.Parse (conexaocrm);
using (Microsoft.Xrm.Client.Services.OrganizationService orgService = new Microsoft.Xrm.Client.Services.OrganizationService (connection))
{
Entity contact = new Entity ( "contact");
contact [ "firstname"] = name;
contact [ "lastname"] = name;
contact [ "new_cpf"] = cpf;
contact [ "emailaddress1"] = email;
contact [ "telephone1"] = tel_comercial;
contact [ "birthdate"] = Convert.ToDateTime (dt_nascimento);
Guid = ContactID orgService.Create (contact);
Entity account = new Entity ( "account");
account [ "name"] = "Test Account";
EntityReference EntityReference primarycontactid = new ( "contact" ContactID);
account [ "primarycontactid"] = primarycontactid;
Guid = accountId orgService.Create (account);
}
}
}
catch (Exception ex)
{
Console.WriteLine ( "Error reading CRM Base:" + ex.Message);
}
*This post is locked for comments