7. Juni 2010 16:40
WHERE (FilteredQuote.QuoteId = @CRM_QuoteId)
SELECT Quote.AccountIdName AS Kundenname, Quote.OwnerIdName AS Vertriebsbeauftragter, Quote.QuoteNumber AS Angebotsnummer, Quote.Description AS Angebotsbeschreibung, QuoteDetailBase.ProductId AS produktid, QuoteDetailBase.Quantity AS AnzahlProdukte......
FROM QuoteBase INNER JOIN QuoteDetailBase ON QuoteBase.QuoteId = QuoteDetailBase.QuoteId INNER JOIN Quote ON QuoteBase.QuoteId = Quote.QuoteId INNER JOIN ProductBase ON QuoteDetailBase.ProductId = ProductBase.ProductId INNER JOIN SystemUserBase ON QuoteBase.OwningUser = SystemUserBase.SystemUserId ....
7. Juni 2010 18:23
8. Juni 2010 10:09
declare @SQL nvarchar(max)
SET @SQL = ('
SELECT Quote.AccountIdName AS Kundenname, Quote.OwnerIdName AS Vertriebsbeauftragter, Quote.QuoteNumber AS Angebotsnummer,
Quote.Description AS Angebotsbeschreibung, QuoteDetailBase.ProductId AS produktid, QuoteDetailBase.Quantity AS AnzahlProdukte, QuoteBase.Name AS Angebotsthema, Quote.TotalAmount_Base AS Gesamtpreis, QuoteDetailBase.PricePerUnit_Base AS produktpreis, ProductBase.Name AS produktname, ProductBase.Description AS produktbeschreibung, ProductBase.ProductNumber AS produktnummer, QuoteBase.EffectiveTo AS gueltigbis, SystemUser.Address1_Telephone1 AS tele, SystemUser.Address1_Fax AS fax, SystemUser.InternalEMailAddress AS email, SystemUser.Title AS Titel, SystemUser.MobilePhone AS mobile, ProductExtensionBase.New_TTOKurzbeschreibung AS kurzBeschreibung, QuoteBase.QuoteId
FROM (' + @CRM_QuoteBase + ') INNER JOIN
QuoteDetailBase ON QuoteBase.QuoteId = QuoteDetailBase.QuoteId INNER JOIN
Quote ON QuoteBase.QuoteId = Quote.QuoteId INNER JOIN
ProductBase ON QuoteDetailBase.ProductId = ProductBase.ProductId INNER JOIN
SystemUserBase ON QuoteBase.OwningUser = SystemUserBase.SystemUserId AND QuoteDetailBase.SalesRepId = SystemUserBase.SystemUserId INNER JOIN SystemUser ON SystemUserBase.SystemUserId = SystemUser.SystemUserId INNER JOIN ProductExtensionBase ON QuoteDetailBase.ProductId = ProductExtensionBase.ProductId ')
EXEC (@SQL)
8. Juni 2010 10:19
8. Juni 2010 10:30
14. Juni 2010 11:44
16. Juni 2010 10:04
17. Juni 2010 12:06
SELECT TOP (20) quoteid
FROM FilteredQuote AS CRMAF_FilteredQuote
17. Juni 2010 15:32
Dynamic Drill-through to Microsoft Dynamics CRM
Drill-through in a report is used to navigate to a Microsoft Dynamics CRM Web form.
The steps of drill-through are listed here:
An image or value item (such as a text box) is added to a report. The Value property of this item contains code that builds a URL by using the base address of Microsoft Dynamics CRM plus parameters that refer to a specific instance of an entity.
When the user clicks the report item, a new browser window is opened by using the constructed URL passed as the target Web address.
Microsoft Dynamics CRM loads the information for the specified entity into a Web form that is displayed in the browser window.
To set up drill-through to Microsoft Dynamics CRM:
Create a hidden parameter of type string in the report that has the name CRM_URL. When the report is later run from Microsoft Dynamics CRM, this parameter is automatically set to the Web address of Microsoft Dynamics CRM.
Add a report item, such as a Textbox, that starts the drill-through when you click it.
Right-click the drill-through report item and select Properties from the shortcut menu. The Properties dialog box appears.
Select the Advanced button to display the advanced properties.
In the Navigation tab, check the Jump to URL option and enter an expression in the following format:
= Parameters!CRM_URL.Value & "?ID={"& GUID &"}&OTC=otc"
The entity GUID and entity type code have to be added to the URL to be able to drill through. The entity type code is specified as OTC. For example:
= Parameters!CRM_URL.Value & "?ID={"&Fields!Opportunityid.Value.ToString()&"}&OTC=3"
Click OK to close the dialog box.
In this example code, the value of a dataset field that contains the GUID of an Opportunity object is converted to a string and used as an ID parameter in the URL. A parameter that contains the OTC value (3) for an opportunity entity is also appended.
The GUID of an entity instance can be obtained from the appropriate filtered view, for example, FilteredOpportunity. The OTC value for each entity can be obtained by executing the following SQL code in Query Analyzer:
USE <organization>_MSCRM
SELECT Name,ObjectTypeCode FROM dbo.Entity ORDER BY ObjectTypeCode