Get the products which are under product bundle? RRS feed

  • Question

  • Hi All,

    I am having some confusion regarding the productcatlog. Actually i have a plugin requirement. I have a opportunity product, so that i need to check if that products contains under product bundle or not? So how can i check the relationship b/n product and product bundle. Can you please help some one? Or else please share some sample c# code to get the bundle and product relation?



    Monday, May 4, 2015 11:29 AM


  • Hi,

      Product entity having (1:N) relationship with ProductAssociation entity

    Use PRODUCTASSOCIATION entity to get

    1) Associated Product Bundles based on product

    2) Associated Products based on Product Bundle

    E.g.: In this below example I’m retrieving Product Bundles based on product ID

    string productBundle=@"<fetch distinct='false' mapping='logical' output-format='xml-platform' version='1.0'>

    <entity name='productassociation'>

    <attribute name='productid'/> //ProductBundle field

    <attribute name='associatedproduct'/> //Product field

    <attribute name='quantity'/>

    <attribute name='productisrequired'/>

    <attribute name='uomid'/>

    <attribute name='productassociationid'/>

    <attribute name='statuscode'/>

    <attribute name='statecode'/>

    <attribute name='overriddencreatedon'/>

    <attribute name='propertycustomizationstatus'/>

    <order descending='false' attribute='productid'/>

    <filter type='and'>

    <condition attribute='associatedproduct' value='{your ProductID}' uitype='product' operator='eq'/>




    • Marked as answer by sravan J Tuesday, May 5, 2015 10:17 AM
    Tuesday, May 5, 2015 9:54 AM