CRM 2011 QueryExpression - Randevu Çekme (Get Appointment)

 public static Appointment GetAppointment(IOrganizationService ser, Guid appointmentid, ColumnSet columnset)
        {
            try
            {
                QueryExpression query = GetQueryExpressionSingle("appointment", "activityid", appointmentid, columnset);
                EntityCollection ec = ser.RetrieveMultiple(query);
                if (ec != null && ec.Entities.Count == 1)
                    return (Appointment)ec.Entities[0];
                else
                    return new Appointment();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

GetQueryExpressionSingle metodu


Metot Kullanımı

Appointment appointment = CrmManagerStatic.GetAppointment(crmService, item, new ColumnSet(new string[] { "activityid", "regardingobjectid", "ownerid", "activitytypecode", "actualdurationminutes", "statecode", "statuscode" }));
                 

Hiç yorum yok:

Yorum Gönder