我正在尝试在CRM 2011的报告中使用CRM CRMAF过滤器。但我找不到任何有关如何执行此操作的示例。需要将查询更改为过滤报价以及需要添加哪些参数。
SELECT Quote.QuoteNumber, Quote.Name, Quote.CreatedOn, Quote.CustomerIdName, Quote.OwnerIdName, SystemUser.Address1_Telephone1,
SystemUser.InternalEMailAddress, Quote.Name AS Expr1, Quote.BillTo_Line1, Quote.BillTo_Line2, Quote.BillTo_Line3, Quote.BillTo_StateOrProvince,
Quote.BillTo_PostalCode, Quote.BillTo_Telephone, Quote.BillTo_Fax, QuoteDetail.LineItemNumber, QuoteDetail.Quantity, QuoteDetail.ProductId,
QuoteDetail.ProductDescription, QuoteDetail.BaseAmount, QuoteDetail.ExtendedAmount, Quote.DiscountAmount, Quote.TotalTax, Quote.TotalAmount,
Quote.RevisionNumber
FROM Quote INNER JOIN
QuoteDetail ON Quote.QuoteId = QuoteDetail.QuoteId INNER JOIN
SystemUser ON Quote.OwnerId = SystemUser.SystemUserId
答案 0 :(得分:3)
以下是您可以参考的一个参考: http://blogs.msdn.com/b/crm/archive/2009/03/06/microsoft-dynamics-crm-pre-filtering-tips.aspx
您最终会使用CRM为每个实体创建的特殊过滤视图。
SELECT name, accountnumber
FROM FilteredAccount as CRMAF_Account