Archive
2014 in review
The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.
Here’s an excerpt:
The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 170,000 times in 2014. If it were an exhibit at the Louvre Museum, it would take about 7 days for that many people to see it.
Hierarchy Visualization – CRM 2015
With CRM 2015, you can represent self-referenced records in Chart format, this feature called as ‘Hierarchy Visualization’.
If the Entity is configured for ‘Hierarchy Visualization’, a symbol as below will appear for Self referenced records.
By clicking the chart symbol you will be redirected to below Chart.
Every rectangle, contain record information called as a ‘Tile’
Here is the video from Dynamics team on how to configure ‘Hierarchical Visualization’.
Quick Points
- Only below listed Out Of The box entities can be configured as ‘Hierarchical Visualization’.
- Business Units are not supported.
- Only 1:N relationships can be enabled to be hierarchical (Not supported for N:N)
- Hierarchical settings can be included in Solutions.
- Record data displayed in tile is from ‘Quick View Form’. Only 4 fields are displayed on a tile excluding Sub-grids & IFrames.
- Querying Hierarchical Data
- New commands added in ‘FetchXML’ and ‘Condition Expression’ of ‘Query Expression’, to query Hierarchical data.
- Querying Hierarchical data not supported with OData end point.
- A new RowAggregate called ‘CountChildren’ has been added which returns Count of Child records for the Current record.
🙂
Custom Help Pages – CRM 2015
Before CRM 2015 to get custom help pages, the only way is running unsupported PowerShell commands.
With CRM 2015, CRM administrators can configure Custom help pages for entire organization or for specific customizable entities.
Organization Level Custom Help
- Go Settings -> Administration -> System Settings
- Provide URL of the web page you want to configure as below
- Append Parameters to URL
- By enabling this, in the opened Help page along with URL you get below parameters
- entrypoint – Valid values include form, hierarchychart, and formid. The formid parameter refers to the GUID of the form or hierarchy chart that help was opened from.
- typename – schema name of the entities form where Help opened (Only available when you open Help from entity form)
- userlcid – Logged in users language code.
- By enabling this, in the opened Help page along with URL you get below parameters
Entity Level Custom Help
- We can configure individual help pages for customizable entities.
Note –
- If custom help is turned off, the default help content will be displayed
- Custom Help is not available currently for Tablet
Refer this video from CRM Team.
🙂
Transaction count after EXECUTE indicates a mismatching number – SQL Error
I was getting the below exception when I execute a stored procedure from my C# console application.
My Stored procedure executes in Transaction mode and wrapped in Try/Catch block (Refer below)
CREATE PROCEDURE [Name]
BEGIN TRY
BEGIN TRANSACTION;
— My SQL Script
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
IF XACT_STATE() <> 0
ROLLBACK TRANSACTION;
END CATCH
Reason –
- We get this error if the transaction started and terminated suddenly without committed or rollback.
- In my Stored Procedure I had a ‘return’ statement after ‘BEGIN TRANSACTION’ , so the stored procedure terminated neither calling COMMIT nor ROLLBACK.
Fix –
- Put “SET XACT_ABORT, NOCOUNT ON” statement which suppresses the error.
- So the modified Stored Procedure template is as below
CREATE PROCEDURE [Name]
AS
SET XACT_ABORT, NOCOUNT ON
DECLARE @starttrancount int
BEGIN TRY
SELECT @starttrancount = @@TRANCOUNT
IF @starttrancount = 0
BEGIN TRANSACTION
— Your SQL Script
IF @starttrancount = 0
COMMIT TRANSACTION
END TRY
BEGIN CATCH
IF XACT_STATE() <> 0 AND @starttrancount = 0
ROLLBACK TRANSACTION
END CATCH
🙂
Different ways of referencing web resources – CRM
If you have a HTML file added as a Web resource in CRM and it need to refer below web resources
- new_jquery
- new_dummy
Below are 2 ways to achieve the same
Standard Way
One way is to follow below convention to refer the web resource files in your HTML file
<script src=”../webresources/{webresourcename}”></script>
Referencing by folders
Assume you maintain files in folder structure, in your Visual studio solution which looks as below
- Jscript
- Util
- jquery.js
- helper.js
- Account
- account_form.js
- account_ribbon.js
- Util
- CSS
- dummy.css
Below is a more readable way to refer CRM web resources in HTML file.
Below are steps to achieve same.
Step 1
Add web resources with name as “solution prefix_/{webresourcename}”, as below.
- new_/Jscript/Util/jquery
- new_/CSS/dummy
Step 2
When you follow above naming convention, web resources can be referenced like how we do it in Asp.net projects, as below
<script src=”Jscript/Util/jquery” type=”text/javascript”></script>
Refer MSDN Link
CRM 2015 Enhancements and new features
CRM 2015 is the latest advent of Microsoft Dynamics CRM and its previously code named as “Vega”.
As you get lot of resources about CRM 2015 over internet, this article briefs you about major enhancements and new features.
Calculated and Roll-up Fields
Prior to Dynamics CRM 2015, to perform calculations or rollups, we had to write code.
In CRM 2015 its pretty much configurable at field creation level.
There is a new attribute called ‘Field Type’ where you can set when you create a new field.
Field Type can be Simple/Calculated/Rollup.
‘Simple’ is same field type provided in previous versions of CRM
Calculated Fields
- Assume you have a Date field “Purchase Date” and you want to calculate “Estimated Close Date” value based on another option set field ‘Type’
- If ‘Type’ is ‘Fruit’, Then Estimated Close Date= Purchase Date + 20
- If ‘Type’ is ‘vegetable’, Then Estimated Close Date= Purchase Date + 30
- To achieve this before CRM 2015, we rely on code\script.
- With CRM 2015, you can achieve the same using ‘Calculated Fields’
Rollup Fields
- Rollup fields are used to perform record level aggregation from related records (With 1:N Relationship)
- You can display Sum or Average of Estimated Revenue of all Related Opportunities on Account form
Note –
- Calculated fields store in the database and can be used in views / reports / charts / forms / Field Level Security.
- Record has to be saved before calculated field is updated when form refreshes
- If you choose a field type, you cannot alter to ‘Simple or Calculated’ fields
- The moment you choose the field as Rollup or Calculated, system automatically saves the field (Weird, you don’t need to click ‘Save’).
- Rollup using other rollup fields is not supported
Field Level Security (FLS)
- In CRM 2015, we can define Field Level Security(FLS) on both Out of the box and Custom fields
- In CRM 2013, its available only to Custom fields
- In CRM 2015, FLS extended for additional attribute types such as address fields (out of the box only) and email fields (custom or out of the box fields).
Hierarchical Security Model
- With Hierarchy security modeling, granular record level access can be granted for an organization without having to create and manage business units.
- It can be ‘Manager’ or ‘Custom position’ Hierarchy
Global Search
- We can search records across different record types or configure specific fields on our preferred entities.
- Few things to consider as below
- Refer this video from Dynamics team
Custom Help Pages
- Refer my article
Hierarchy Visualization
- Refer my article
Miscellaneous Enhancements
Disable Navigation Tour
- In CRM 2015, there is an option in Settings -> Administration -> System Settings whether to display Navigation Tour to User or not.
- Even if option set to not display, User can always get the ‘Navigation Tour’ by navigating as below
Nested Quick Create Form
- Quick Create Forms introduced in CRM 2013 but to create a new Contact from Account’s Quick Create form, we will get Contacts Create form instead of Contacts Quick Create Form.
- In CRM 2015, we will get Contact Quick Create form from the Account’s Quick Create form which is a ‘Nested Quick Create Form’
Check out Dynamics CRM 2015 Release Preview Guide for more details.
🙂