9 Aralık 2015 Çarşamba

CRM 2011 QueryExpression - Fiyat Listesi Çekme (Get PriceLevel)

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

GetQueryExpressionSingle metodu


Metot Kullanımı

 PriceLevel priceList = CrmManagerStatic.GetPriceLevel(crmService, _pricelevelid, new ColumnSet("pricelevelid", "transactioncurrencyid"));
                                       ;

Hiç yorum yok:

Yorum Gönder