9 Aralık 2015 Çarşamba

CRM 2011 QueryExpression - Fiyat Listesi İçerisindeki Fiyat Listesi Kalemlerini Çekme (Get ProductPriceLevel in PriceLevel)

 public static EntityCollection GetProductPriceLevel(IOrganizationService ser, Guid pricelevelid, ColumnSet columnset)
        {
            try
            {
                QueryExpression query = GetQueryExpressionSingle("productpricelevel", "pricelevelid", pricelevelid, columnset);
                EntityCollection ec = RetrieveMultipleQuery(ser, query);
                if (ec != null && ec.Entities.Count > 0)
                    return ec;
                else
                    return new EntityCollection();
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }

GetQueryExpressionSingle metodu


Metot Kullanımı

EntityCollection ec_Products = CrmManagerStatic.GetProductPriceLevel(crmService, priceList.Id, new ColumnSet(new string[] { "productpricelevelid", "productid", "amount" }));
 if (ec_Products != null && ec_Products.Entities.Count != 0)
{

}

Hiç yorum yok:

Yorum Gönder