Hi, If you have the ID of the contact you can retrieve it directly instead of querying: public void Execute(IServiceProvider serviceProvider) { IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); var contact = service.Retrieve("contact", theId, new Microsoft.Xrm.Sdk.Query.ColumnSet(true)); {...} } Hope this helps! I'd appreciate if you'd mark this as a Verified answer. Thanks, Aiden
↧