Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Creating Activity using CreateNewActivityEntry of CrmServiceClient

$
0
0

This is similar to a previous issue reported here:  https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/279560/unable-to-create-activity-using-createnewactivityentry-of-crmserviceclient

However, that issue was never resolved.

I am calling the CreateNewActivityEntry() method in the CrmServiceClient. The method always returns an empty Guid and does not throw an error.  The activity record is never created.

Example code:

Guid tmpRet = Guid.Empty;
if (contactID != null)
{
	CrmServiceClient tmpSvc = TrueHomes.CRM.ServiceReference.Crm.CreateCrmService(ConfigurationManager.AppSettings["CRMServiceURL"], ConfigurationManager.AppSettings["CRMOrganization"]
		, ConfigurationManager.AppSettings["CRMServiceUserName"], ConfigurationManager.AppSettings["CRMServicePassword"], ConfigurationManager.AppSettings["CRMServiceDomainName"], 0, "");

	//this is not creating the record but not throwing an error either
	tmpRet = tmpSvc.CreateNewActivityEntry(activityTypeName, entityTypeName, contactID, subject, description, createdByID.ToString());
}
else
	throw new ApplicationException("ContactID cannot be null");

return tmpRet;

We use other methods on this service so I know the service works.

The parameters all contain values that I believe are correct, but I have not been able to find any examples of implementing this method anywhere.

Does anyone have experience using the CreateNewActivityEntry method and can help?

Here is some relevant version info:

  • Using Microsoft Dynamics CRM 2016 Version: 8.1.0.359
  • Application version: .NET version 4.6.1
  • SDK version from NuGet: Microsoft.CrmSdk.XrmTooling.CoreAssembly package version 8.2.0.1

Thanks,

Eric


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images