Category Archives: CRM 4.0

Dynamics 365: Modern Advanced Find

I have been used to using Advanced find (now can be referred as Legacy Advanced find screen) since 2005 and this screen is/was pretty much back bone of dynamics system since first release of dynamics.

Legacy Advanced Find

Recently Microsoft have announced introducing Modern Advanced find for Model Driven App  which will pretty much replace existing advanced find screen.

To enable this feature, go to https://admin.powerplatform.microsoft.com/environments and select relevant environment and then go to feature and enable this feature as shown in screen print below.

Enable Modern Advanced Find

Creating new view

For creating new view, click on Data-verse Search box and click on “Search for rows in a table using Advanced filters” link

D365 Creating a New view

On next screen select relevant table.

This table list is limited to only the ones specified with in Model Driven App so this is major change as currently in legacy Advanced find screen user can search on any tables they can access based on their Permission.

select Table for View

Once selected relevant Table and then on next screen Create relevant filter and click on Apply  

View Filter

After this, click on Save as new view and on next screen give relevant view name for this.

Saving New View

After clicking on Save, new Personnel view will be created against this table.

Amend Existing view

To amend existing personnel view, select relevant view and select Edit Columns (to Add/ Remove columns) or Edit Filter (to change view criteria)

Amend Existing View

Delete/Hide or Change View Name

Click on “Manage and share views” link which will allow user to Edit view name, user can hide and delete not requirement view as well from this screen.

Delete/Hide View

This allows configure sorting of views as well.

If as an Administrator if you want to apply this settings for multiple user then use XRMToolbox Plug-in called “User Views Display Settings” for this (refer screen print below)

XrmToolBox

Note: –

Even though after enabling Modern Advanced Find, Legacy Advanced Find icon is not longer visible but if some user still wants to access, they can access via following URL. (Replace CRMURL and APPID for your relevant environment)

XrmToolBox: New Tool: BusinessRulesScriptViewer

Business Rules introduced in dynamics quite a few years back with CRM 2013 , We have been using these dynamics features since then..  

These Business rules internally generates JavaScript code which will be executed on relevant form, I have Created Tool which will allow us to view and export this JavaScripts for development purpose.

This will mainly help to diagnose any business rules issue encountering in dynamics 365 or data verse application.

To Install this toll, open XrmToolBox Tool Library and selected “BusinessRulesScriptViewer” and then press Install

Once installed, open this tool and connect to the relevant data version environment.

Following are brief steps on how to use this tool.

XrmToolBox : BusinessRulesScriptViewer

Step 1: Select Solution from the solution dropdown

Step 2: After Solution is selected, the system will show you all entities which are in the currently selected solution so pick the relevant entity (or table) where the auto number column resides.

Step 3: Once Entity is selected, it will populate all available Business Rules for selected Entity in left tree view Control.

Step 4: Select relevant Business Rule, system will show script related to selected Business rules

Step 5:  if you want to save current selected Business Rule JavaScript to Disk then Press “Save Selected BR Script”

Step 6:  if you want to save all selected entity Business Rules JavaScript to Disk then Press “Save All BR Scripts”

XrmToolBox : BusinessRulesScriptViewer

I hope this helps…

Regards,
Mayank Pujara

XrmToolBox: New Tool: ReAssignPersonnelViews

This new tool allows to migrate any personnel views from one user or team to another user or team.

This is linked to one of my old blog article https://mayankp.wordpress.com/2012/09/21/crm-2011-reassign-or-transfer-personal-views/

This Tool is useful in scenarios where one of the CRM users left the company and that user owned specific views which need to be transferred to his replacement CRM users/Teams.

These personnel views are created by old users using CRM advanced find screen and hence they are personal views of that user and as per CRM security settings even system administrators can not able to view and transfer these views to new users or Teams.

To resolve this issue, I have created the following new XrmToolBox Tool called “ReAssignPersonnelViews”.

Once installed, open this tool and connect to the relevant data version environment.

Following are brief steps on how to use this tool.

XrmToolBox : ReAssignPersonnelViews

STEP 1: Selected Source User or Team, After selecting this system will load all personnel views for selected user or team in below Grid Control

STEP 2: Select views from Grid Control which needs to be Transferred across to New User or Team

STEP 3: Select Destination User or Team

STEP 4: Finally Press Transfer Selected Views To Destination User or Team Button

After Pressing Transfer button, the system will display the log of transferring Views as Shown in the screen print below.

XrmToolBox : ReAssignPersonnelViews Log Screen

Note: – 

1.Please note that both users’ needs to be active in the CRM to perform the above actions.

2.The Destination User or Team must have valid permission to hold these views.Hope this helps.

Cheers,
MayankP:)

CRM AUDITING: SQL Database Standard to Enterprise version

So on MS CRM Audit Log screen we could not see any partition details available even though (as shown in screen print below) even though we are using enterprise version of SQL.

B102082016_1

We also realized that our audit table grown very large and was started impacting performance as well, during investigation it is revealed that MS CRM organization was created from back up which was taken from standard SQL version.

So when new organization import process run then CRM system did not created these partition so we contacted Microsoft support and they provided following SQL script for this.

After running script we started seeing CRM Audit partition in the system now.

B102082016_2

CRM AUDIT: SQL enterprise to standard version

if your requirement is other way around so your current CRM SQL DB is enterprise version and if you want to migrate to standard SQL version then follow the steps provided in this KB article to restore DB and then after this perform normal import organization operation in CRM for this.

Hope this helps…

Cheers,
MayankP:)

 

 

Book Review: Packt Microsoft Dynamics CRM 2011 Reporting

I have been asked me to  review the Microsoft Dynamics CRM 2011 Reporting written by Damian Sinay

Image

The reviewers for the book are:

Overview and Structure of the Book

The book is 308 pages and the chapters are:

  • Preface
  • Chapter 1: Introduction to Reporting in      Microsoft Dynamics CRM
  • Chapter 2: Database Basics
  • Chapter 3: Creating Your First Report in CRM
  • Chapter 4: SQL Server Report Builder
  • Chapter 5: Creating Contextual Reports
  • Chapter 6: Creating Inline Reports
  • Chapter 7: Using Reports and Charts in      Dashboard
  • Chapter 8: Advance Custom Reporting and      Automation
  • Chapter 9: Failure Recovery and Best Practices
  • Chapter 10: Mobile Client
  • Appendix : Expression Snippets

 

Preface

This book covers all different options available for CRM reporting and provides good grounding in CRM reporting aspects so any users/developers want to learn/understand CRM reporting better this is book for them.

Chapter 1: Introduction to Reporting in Microsoft Dynamics CRM

The first chapter explain different types of reports available in CRM and also explains installation procedure for CRM 2011 connects and Reporting authoring extension.

SQL reporting service version sections (page 15) explains different SQL server version compatibility with SQL Server and CRM server and states that SQL Server 2012 is not compatible with Visual studio 2012 for CRM 2011 Reports. I guess this was correct at time of book writing but since then Microsoft released update of SQL Server Data tools and after this update Visual studio 2012 can also be used to develop CRM reports for SQL Server 2012.

Chapter 2: Database Basics

This chapter explain basic and advanced commands of SQL Language and also FetchXML Language. All the dynamics CRM views are created with this FetchXML language and users can now write reports in CRM 2011 using this language as well.

 Chapter 3: Creating Your First Report in CRM

This chapter takes you through step by step guide on how to create report in CRM using CRM reporting wizard and then how to modify that report in SQL Reporting Service Project.

Chapter 4: SQL Server Report Builder

This chapter explains step by step guide to create report using SQL Report Builder which comes with SQL Reporting services. SQL Report Builder can be used by intermediate user to develop CRM reports.

Chapter 5: Creating Contextual Reports

This chapter looks at advanced tools (visual studio) to create CRM report and this chapter also reviews CRM report parameters and chart controls.

Chapter 6: Creating Inline Reports

This chapter looks ate crating embed report on CRM entity form. It creates HTML web resource to achieve this functionally and chapter also explains how to create/update this HTML web resource. 

Chapter 7: Using Reports and Charts in Dashboard  

This chapter explains process of integrating report in CRM dashboard and CRM charts (i.e. new feature in CRM 2011) basics.

 Chapter 8: Advance Custom Reporting and Automation

This chapter explains how one can integrate a custom ASP.NET or Silverlight application to show a dynamic or more sophisticated report inside Dynamics CRM 2011

Chapter 9: Failure Recovery and Best Practices

This chapter looks at how one can troubleshoot different issue arising while working with reports in CRM 2011. Quick rightly these details were need as user will tend to hit these issues while developing CRM 2011 report. This chapter also focuses on performance enhancement and SQL Reporting Service Best practices.

Chapter 10: Mobile Client

This chapter explores CRM reports on different mobile devise like iPhone, iPod and Microsoft Surface and also explains process of configuring IFD authentication with CRM.

Appendix: Expression Snippets

This section explores basic expression and their usage in reports and how can you add external code, variable and assemblies in report.

Final Verdict

Provided that we already have Dynamics CRM books but I guess each book generally dedicates chapter or two for CRM reporting only while this book is specifically for CRM reporting which is really good.

And although this does not cover all types of reports (i.e. matrix reports, SQL advanced chart type reports) related to CRM it does cover lots of details related to CRM report So if you are just started work in CRM reports or working in CRM reports but want to know more about it this is definitely book for this.

If you are interested in buying above book, here is link for this.

http://www.packtpub.com/microsoft-dynamics-crm-2011-reporting/book

Cheers,

MayankP:)

 

 

 

 

CRM : Rescheduling the Update Contract States job

Update Contract States job is CRM 2011 (also for CRM 4.0) system job which runs daily and change the contract status based on contract start date and end date (i.e. change contract from Invoiced to active and from Active to expired).

One of customer’s CRM organization has this job running 10 PM at night and wanted to change this job on particular time (very early in the morning) to make sure contract status are up to date when users starts using CRM system.

There is job editor provided by MS to reschedule CRM system jobs but this does not include this specific job.

so following are steps we undertook with the help of CRM parter/MS support to reschedule this particular job in CRM system.

Step 1: run the following query to find the current Jobs in the relevant CRM organization. (note down the AsyncOperationid returned from this query as we will be using this in next step)

select AsyncOperationid,RecurrenceStartTime,postponeuntil,StatusCode, RecurrencePattern from AsyncOperation WHERE
Name = 'Update Contract States job'
and
StatusCode =10
and RecurrencePattern is not null

following quick details regarding important columns in this table.

RecurrencePattern is used to describe frequency and interval of the system jobs and please refer this article for more information on regarding this.

Postponeuntil is datetime field and indicate when this job will run next time. And it is UTC date meaning if this field contains “2012-10-23 09:08:00.000” and if your time zone is GMT + 1 then this job will run next time on “2012-10-23 10:08:00.000”

RecurrenceStartTime is also UTC datetime field which will be used to set next runtime of job, date part of this field is not important as long as it is set in the past.

Step 2: so using noted down AsyncOperationid in step 1 run following query to update recurrencestarttime, postponeuntil for this Update Contract States job .


update AsyncOperation set
RecurrenceStartTime = '2012-10-22 09:08:00.000',
postponeuntil = '2012-10-23 09:08:00.000'
WHERE AsyncOperationid = '5EB24ECB-60ED-4F59-801D-A6C19465C4D8'

So as per above update, this job will run at 9:08 AM (GMT time) in the morning every day.after job run if you verify the details then it would look as follows. So as you can see system will update postponeuntil (next run time) to next day (24th October) after this job run today (on 23th October).

****Important Notes regarding above change****
above change is unsupported so make sure you apply this change to Dev, Test environment before applying this to Live environment. Also make sure you take back up of database before doing this change.

Hope this helps..

Cheers,
MayankP:)

How to find records created on weekends or created on after working hours

Recently one of our customer asked how to find cases or emails created on Saturday/Sunday or cases created after normal working hours (i.e. after 18 PM?).

Of course this CRM system had email router which were creating those email and automatic case were created based on this.

I did try to so this using advanced find but it is not possible to get the desired result and try to do this using Excel features and it was really easy, following quick steps for the same using Excel.

Step 1: Export data to excel, so do advanced find on CRM (CRM 4.0 or CRM 2011) to retrieve relevant data and then export that to excel.

Step 2: once exported add new columns, let’s say those columns are called “DAY”, “Time HOUR” and “Time MIN”.

Step 3: put formula to retrieve values for those columns, as shown below. Please note that column G is created on date and based on this column G following formula are created. Please change column name as per your requirement.

COLUMN I (DAY) :

=IF(WEEKDAY(G2)=1,"SUNDAY",IF(WEEKDAY(G2)=2,"MONDAY",IF(WEEKDAY(G2)=3,"TUESDAY",IF(WEEKDAY(G2)=4,"WEDNESDAY",IF(WEEKDAY(G2)=5,"THURSDAY",IF(WEEKDAY(G2)=6,"FRIDAY",IF(WEEKDAY(G2)=7,"SATURDAY",)))))))

COLUMN J (Time Hour):
=HOUR(G2)
COLUMN K (Time Hour):
=MINUTE(G2)

Step 4: after apply this formula to all rows and you will get following result.

Step 5: you can apply standard excel filter to return only cases created on weekends (Saturday/Sunday) or cases created after 18 PM easily.

Hope this helps…

Cheers,
Mayank:)

Getting View Details from CRM Grid (CRM 4.0 vs. CRM 2011)

We had custom application which uses were passing selected view id to our custom web page in CRM 4.0, following code we put in JavaScript button click event to retrieve this details.


if (top.stage.crmGrid != null)
{
var sViewId = top.stage.crmGrid.GetParameter('viewid');
var sViewType = top.stage.crmGrid.GetParameter('viewtype');
var sOtc = top.stage.crmGrid.GetParameter('otc');
}

Above code does not work in CRM 2011 and by doing really simple change as mentioned below, so following code works fine for CRM 2011..


if (document.getElementById('crmGrid') != null) {
var sViewId = document.getElementById('crmGrid').GetParameter('viewid');
var sViewType = document.getElementById('crmGrid').GetParameter('viewtype');
var sOtc = document.getElementById('crmGrid').GetParameter('otc');
}

Hope this helps..

Note: This is unsupported customization, Please unit test this module on your development/test environment before applying it to Live Environment.

Cheers,
Mayank:)

CRM Outlook client Installation issue

One of my colleagues had following issue while installing latest CRM roll up for outlook client.

Installation cannot proceed: Setup cannot continue because a pending restart is required. Restart the computer and then try running Setup again

Please read this article for the solution regarding this.

Hope this helps…

Regards,
MayankP 🙂

CRM 4.0 Printing Error – This form has been changed and must be saved before printing.

One of user posted this error in this CRM thread, we had similar issue some time back and one of my colleagues had resolved this issue.

Problem
This error comes if you got java script code which is constantly updating some variables in the back ground. This makes CRM Form engine believes that form has been changed so CRM print function will not allow you print CRM form.

Solution
The solution for this is that we over ride existing CRM print on click event and write function to run this print job manually.
Following is example script for Phone call entity. This script needs to put in to the Form On Load Event.

Following text version of above code, change the object type code as per your requirement.

if (document.getElementById('_MBcrmFormPrint') != null)
{
document.getElementById('_MBcrmFormPrint').action = ' openStdWin(prependOrgName("/_forms/print/print.aspx?objectType=4210&id=" + crmForm.ObjectId + "&title=" + CrmEncodeDecode.CrmUrlEncode(parent.document.title))); ';
}

Hope this helps!!

Note: – This is unsupported change so please make sure you take necessary back up before doing this change.

Cheers,
MayankP 🙂