Alan,
I had the same problem as you and resolved it in the following way:
This problem has to do with the fact that CRM wants to use 1 workflow per
sales cycle, and at the end of the workflow it inserts an entry into the
asynoperationbase table amongst others. To fix this I amened some views.
1) Amend the SalesProcessInstance view add the "modifiedon" column using
the design view
2) To keep everything standard (i.e. to keep the original pipeline report in
CRM) I renamed the "FilteredSalesProcessInstamce" to
"FilteredSalesProcessInstance_Original" and also added the "modifiedon" column
3) Create a new view called "FilteredSalesProcessInstance" and add the
"FilteredSalesProcessInstance_Original" view. The SQL should look like this:
SELECT BusinessUnitId, BusinessUnitIdDsc, BusinessUnitIdName,
OpportunityId, OpportunityIdDsc, OpportunityIdName, SalesProcessInstanceId,
SalesProcessName, SalesStageName, ModifiedOn
FROM dbo.FilteredSalesProcessInstance_original
WHERE (ModifiedOn IN
(SELECT Newestdate
FROM (SELECT DISTINCT OpportunityId,
MAX(ModifiedOn) AS Newestdate
FROM
dbo.FilteredSalesProcessInstance_original AS
FilteredSalesProcessInstance_original_1
GROUP BY OpportunityId)
AS op))
Effectively what I am doing is assuming that the modifiedon date is unique
AND selecting the newest modifiedon date for every unique opportunityid.
Run the pipeline repot and it works!
rgds
Garth
"Alan Whitehouse" wrote: