9 Aralık 2015 Çarşamba

CRM 2011 QueryExpression - Telefon Görüşmesi Çekme (Get PhoneCall)

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

GetQueryExpressionSingle metodu


Metot Kullanımı

PhoneCall phoneCall = CrmManagerStatic.GetPhoneCall(crmService, item, new ColumnSet(new string[] { "activityid", "regardingobjectid", "from", "to", "ownerid", "activitytypecode", "actualdurationminutes", "statecode", "statuscode" }));
                     

Hiç yorum yok:

Yorum Gönder