Thursday, March 16, 2017

VS Shortcut for Data View Pane on SSRS Report

To open the Data View pane for an SSRS report do the following.

-Open Report
-Click on the Report Canvas
-Use the following keyboard shortcut
Ctrl+Alt+D

CRM SSRS FetchXml PreFiltering Tips

I don't do custom SSRS to often but when I do I consonantly have issues pre-filtering FetchXML in SSRS reports.  The items below are what I have found to be the total set of requirements to make sure it works.

Example:  Let's say we have an entity called 'new_house'.  Below is the FetchXML statement I would use in the data set.

<fetch mapping="logical" version="1.0">
 <entity name="new_hosue" enableprefiltering="true" prefilterparametername="CRM_Filterednew_house">
  <all-attributes/> 
</fetch>



Here are the steps i usually take to create this fetch.

-Open the query designer and paste in the fetch without the enableprefiltering and prefilterparametername attribute.

<fetch mapping="logical" version="1.0">
 <entity name="new_hosue" >
  <all-attributes/> 
</fetch>


-Next add the enableprefiltering="true" attribute then close the dataset.  A new Parameter will automatically be created in your report.  Sometimes SSRS will create the report parameter name correctly but sometimes it will not.   The report parameter MUST have the following naming convention.  If it does not select the properties of the parameters and change it's name.

CRM_Filtered<entityname>

So in my case it needs to be called CRM_Filterednew_house

-Reopen the dataset and update the fetch to include the prefilterparametername attribute

<fetch mapping="logical" version="1.0">
 <entity name="new_hosue" enableprefiltering="true" prefilterparametername="CRM_Filterednew_house">
  <all-attributes/> 
</fetch>



Final Notes:
-DO NOT ALIAS the entity you are prefiltering.  If you add the alias it will not work.  You may Alias any Linked Entities.
-DO NOT RE-UPLOAD your file to the same Report record you created in CRM.  When you do the initial upload of the report the first time a lot of things are saved to this record and are not updated if you just edit the record and upload a new rdl file.



Monday, February 6, 2017

RDWeb - Cannot use Connect to a PC Functionality

After completing the setup of the RDS/RDWeb on Windows Server 2012 R2 we were unable to use the "Connect to a PC" functionality. When attempting to connect the following error:

Remote Desktop can't find the computer "". This means that "" does not belong to the specific network. Verify the computer name and domain that you are trying to connect to" 

The fix for this is to go into the IIS Manager on the RDS server. 
 -Go to Server -> Sites -> Default Web Site -> RDWeb -> Pages 
-Click on Application Settings. 
-Modify the DefaultTSGateway setting by entering the FQDN of your RDS server. eg(rds.richardawilson.lab)

Tuesday, October 18, 2016

Deleted Forms Cause Error in Publish

During recent CRM upgrades I started getting the following error on publish.
systemform With Id = {Guid} Does Not Exist
After looking through the database it was discovered that there were upgraded forms that had been marked with the component state of deleted which were causing the error. Deleting those rows marked with the component state of 2 (deleted) allowed for publishing.

*** Disclaimer: Modifying CRM data directly can void your warranty. Use at your own risk. ***
delete from systemformbase where componentstate = 2

Tuesday, October 4, 2016

Repost: Loading Assemblies from Anywhere into a New AppDomain by 2012 by Marius Bancila

If you are interested in loading assemblies into a worker domain which do not live in the base directory of that worker domain, check out this great article with code. http://www.codeproject.com/Articles/453778/Loading-Assemblies-from-Anywhere-into-a-New-AppDom

Friday, September 9, 2016

Watch Window Copy for Plugin Context Depth Issues

For those times when you are trying to figure out a plugin depth issue and you want to quickly copy/past into your watch window.

pluginExecutionContext.PrimaryEntityName
pluginExecutionContext.Depth
pluginExecutionContext.Stage
pluginExecutionContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.Depth
pluginExecutionContext.ParentContext.Stage
pluginExecutionContext.ParentContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.ParentContext.Depth
pluginExecutionContext.ParentContext.ParentContext.Stage
pluginExecutionContext.ParentContext.ParentContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.ParentContext.ParentContext.Depth
pluginExecutionContext.ParentContext.ParentContext.ParentContext.Stage
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.Depth
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.Stage
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.Depth
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.Stage
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.PrimaryEntityName
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.Depth
pluginExecutionContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.ParentContext.Stage

Thursday, August 4, 2016

Get Solutions Containing Web Resource

Snipit to determine which solutions contain a web resource.
SELECT TOP 1000 
 S.FriendlyName, 
 s.UniqueName, 
 WR.DisplayName, 
 WR.Name     
  FROM [Default_MSCRM].[dbo].[SolutionComponentBase] SC
  LEFT JOIN Default_MSCRM.dbo.SolutionBase S ON S.SolutionId = SC.SolutionId
  INNER JOIN Default_MSCRM.dbo.WebResourceBase WR ON WR.WebResourceId = SC.ObjectId
  WHERE WR.Name LIKE '%classeventscoresheet.htm%'