9 Aralık 2015 Çarşamba

CRM 2011 QueryExpression - Fatura Çekme (Get Invoice)

   {
            try
            {
                QueryExpression query = GetQueryExpressionSingle("invoice", "invoiceid", invoiceid, columnset);
                EntityCollection ec = ser.RetrieveMultiple(query);
                if (ec != null && ec.Entities.Count == 1)
                    return (Invoice)ec.Entities[0];
                else
                    return new Invoice();
            }
            catch (Exception ex)
            {
               FileLogHelper.LoggEx(ex, typeof(CrmManagerStatic), "public static Invoice GetInvoice (IOrganizationService ser, Guid invoiceid, ColumnSet columnset)" + Environment.NewLine +
                                                                    "InvoiceId :" + CommonFunction.ToString(invoiceid));
                throw ex;
            }
        }

GetQueryExpressionSingle metodu


Metot Kullanımı

Invoice fatura = CrmManagerStatic.GetInvoice(crmService, invoiceid, new ColumnSet("invoiceid", "pricelevelid"));

Hiç yorum yok:

Yorum Gönder