9 Aralık 2015 Çarşamba

CRM 2011 QueryExpression - FiyatListesi Kalemi Çekme (Get ProductPriceLevel)

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

GetQueryExpressionSingle metodu


Metot Kullanımı

ProductPriceLevel priceListItem = CrmManagerStatic.GetProductPriceLevel(crmService, productPriceLevelId, new ColumnSet("productpricelevelid", "uomid", "amount"));
                                     

Hiç yorum yok:

Yorum Gönder