Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 123975

Forum Post: RE: FetchXML Report Product Association

$
0
0

So I was able to design a report in VS that meats my requirements but wondering if anyone can help with a few missing items. What am I missing that is not letting me see the product numbers for any items that are not in a kit as well as the product locations??

SELECT     so.OrderNumber, so.Name, so.StatusCode, so.StateCode, so.RequestDeliveryBy, so.new_pickupdate, sod.CreatedByName, so.AccountIdName, p.ProductNumber,

                     sod.ProductIdName, sod.ProductDescription AS WriteInProduct, sod.UoMIdName AS UOM, p.new_productlocation, sod.Quantity

FROM         SalesOrder AS so LEFT OUTER JOIN

                     SalesOrderDetail AS sod ON sod.SalesOrderId = so.SalesOrderId LEFT OUTER JOIN

                     ProductAssociation AS pa ON sod.ProductId = pa.ProductId LEFT OUTER JOIN

                     ProductBase AS pb ON pa.AssociatedProduct = pb.ProductId LEFT OUTER JOIN

                     Product AS p ON pb.ProductId = p.ProductId

WHERE     (so.OrderNumber = @orderid)


Viewing all articles
Browse latest Browse all 123975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>