Sunday 17 April 2016

How to fetch all product attached in Invoice of the product grid in Dynamic CRM.

product attachted in Invoice in Dynamic CRM

Description:
 


In this example we explain that how to fetch all product attached in Invoice of the product grid in Dynamic CRM.

Dynamic CRM to fetch all products items attached with Order/Invoice in grid using SQL Query.

SQL Query to get all product (item) attached in Invoice of the Product Grid in Dynamic CRM.
Many question raised depend of different user like how can I fetch all product items for the particular invoice or order using SQL Query.

Below is the SQL Query that will returns all the product item attached with its related invoice or order.

--Fetch Items for Invoice:

Select * From FilteredInvoiceDetail Where InvoiceId ='3853DAB5-ECD6-E511-80C0-00155D041624' --{Guid of your invoice}

--Fetch Items for Sales Order:

Select  * From FilteredSalesOrderDetail Where SalesOrderId ='FC053494-ECD6-E511-80C0-00155D041624' --{Guid of sales order}

The question was raised in your mind like why we using the FilteredViews rather than table the reason was that FilteredViews use security roles to filter the data that available to the user. This means that report have the ability to change the data based on the what users security roles or business unit.



This entry was posted in :

0 comments:

Post a Comment