Labels

Sunday, September 4, 2016

Check CRM Form Performance

The Microsoft Dynamics CRM Performance Center is a fantastic addition to CRM which can help you troubleshoot performance issue related to loading forms in CRM.
The Performance Center is available in CRM Online and CRM OnPremise 2013 SP1 or higher. The performance center doesn’t seem to work in Chrome (the browser closes with the key combination), but IE 8+ works fine.
To enable the Performance Center:
1.    Open a form that you want to benchmark
2.    Hit Ctrl+Shift+Q to open the Performance Center window

3.    Click ‘Enable’ to start logging, and then ‘Close’


4.    Refresh the form and open the performance center again
5.    Verify the benchmarks are now loaded
6.    Click ‘Select Major’ to get a summary of milestones

7.When you’re done with the Performance Center, make sure to click ‘Disable’ to stop the logging, so you aren’t adding additional overhead.

Sunday, August 28, 2016

Customer Data Type in CRM 2016

New Data Type “Customer” has been introduced in CRM 2016 and can create in Custom Entity as well.

Customer Data Type is combination of both Contact and Account Entities, one can choose either Contact or Account record.  


We can give proper Relationship Names (To Account To Contact) before creating this field (if required or we can use as it is).



After Creating this field two Relationships will be created one with Account and one with Contact.
Create this field and place it on the Form, Save and Publish.
Open New Record and Test this field to select either Account or Contact.



Import CRM Organization Using CRM SQL Server backup file

Import CRM Organization using Existing SQL Server CRM Database backup file.
 Follow the below steps
Step 1: Open SQL Server Management Studio. I am using SQL Server 2012 Enterprise Edition.
Step 2: Provide Server name, Authentication, User name and Password. Click on Connect.

Step 3: Take Backup of the Required Organization before do this Operation.
CRM Organization database backup
Please follow the below steps to take CRM Organization database backup,
§  Open SQl Server & Expand Database
§  Right Click on required organization to take Backup
§  Go to Tasks -> Backup



Step 4: Right Click on Databases and click on Restore Database.

Step 5: Follow the below points,
  1.             Select Device.
  2.             Click on  (Browse) button.
  3.            Click on Add.
  4.            Browse bak file that you would like to create Org in MSCRM.
  5.             Click OK and Ok.




Step 6: Provide Destination Database Name that you would like to give for New CRM Organization and click ok.

Step 7: Once the database is restored, you can see the below Message and Click on OK.


Step 8: Open CRM Deployment Manager and Click on Import Organization….



Step 9: You can see the below SQL Server and Organization database name automatically. Click Next



Step 10: Provide Display Name for the New CRM Organization. Automatically Unique Database Name will populate and Click on Next.



Step 11: Report Server URL will auto populate or Provide required URL. Click on Next.
Step 12: Select Automatically Map Users, and click on Next.

Step 13: You will see the list of Active Directory Users. Click on Next.
Step 14: Click on Next.
Step 15: Click on Import.

Step 16: Update Organization is in Progress.

Step 17: Organization imported Successfully. Click on Finish.


Step 18: Go to CRM Deployment Manager and browse for the Organization that you created.








Thursday, June 30, 2016

Increase number of records per page in MS CRM

Increase number of records per page in MS CRM:

Step 1: Open Microsoft Dynamics CRM Online / On-premise. Click on Gear Icon on Top Right Corner. Click on Options.
Step 2: Under General tab, select “Records Per Page” to the required records count per page. (Min: 25 and Max: 250)

Wednesday, December 16, 2015

Microsoft Dynamics CRM Not working

Check This Common Causes




Check the CRM Asynchronous services
This should be your first thing to check because if the ASYNC services have stopped then CRM will stop working.
To see if the Async services are running.
  1. Navigate to Start, select Administrative Tools, then click Services.
You should find there are four CRM Async services and you can see if they are started


The Async processing service is usually the cause of CRM not working.
The problem displayed on this page was caused 
If you have restarted the Asyncs and CRM is still not working

Check IIS is up and running
Go to the Start menu type IIS
It will bring up Internet Information Services (IIS) Manager
IIS is the webserver which hosts the Microsoft Dynamics CRM website.  Some times you can find this may be stopped (very very rarely but its something to check, so we can rule it out)


CRM Application pools are running
CRM web app will have an application pool to run the web app, you need to double check its started and running.  The app pool will usually be set to a service account, the main reason you use a service account is because you don’t need to reset the password every 60 days.  Sometimes this setting won’t have been set and the app pool password will change and until someone goes in and puts/resets the password the CRM App pool will stop working.  When the CRM app pool stops working, CRM stops working.


The CRMAppPool is below:



Check the CRM Website is up or not

If you click on the CRM website called Microsoft Dynamics CRM then the details of the web app will appear on the right, you need to check the start is greyed out (which means it is selected)





World Wide Web Publishing Service
There is also a service which controls if IIS is up and running and this is called the World Wide Web Publishing Service (named in the 1990’s I should imagine, not many times you see the words of WWW).  This can be turned off to stop IIS springing back to life after the server has been rebooted.


 SQL Server
I often think of CRM as a web application to show the contents of the CRM SQL database.  If the SQL CRM instance is down, SQL server is off or can’t be contacted then CRM will stop working.
If CRM isn’t working you need to check the SQL server (usually on a different server) is up and running and the CRM instances are running.



 Windows Event Viewer
There are some common things to check if CRM isn’t working but you will also need to check for some pointers for other errors.  The place I usually start is by checking the Event Viewer log on the CRM server.
Go to the CRM Server
Start Menu – type in Event Viewer
or
Control Panel –> Administrative Tools –> Event Viewer

Windows Logs –> Application

Look at the errors and warnings to see if there is anything which might point you in the direction of the potential error.  It’s unlikely you will actually get an error, usually I find it’s a warning and the warning will point you in the direction of the cause of CRM not working.

Tuesday, June 2, 2015

Audit History Details in Iframe

In this example, I used the following function in the Account OnLoad event, assuming the Account form has an Iframe control named IFRAME_audit.

function SetIframeContent()
{
    var iframeObjId = "IFRAME_audit"; //Iframe Schema Name
    var objectType = 1;//Account
    var areaName = "areaAudit";
    var iframeTitle = "Audit History";
    var formId = Xrm.Page.data.entity.getId();
    formId = formId.replace('{', '').replace('}', '');
    //Get iframe control
    var iframeObject = Xrm.Page.getControl(iframeObjId);
    if (iframeObject != null) {
        //assemble URL
        var strURL = "areas.aspx?formid=" + formId + "&navItemName=" + iframeTitle + "&oId=" + Xrm.Page.data.entity.getId() + "&oType=" + objectType + "&pagemode=iframe&security=852023&tabSet=" + areaName;
        //Set iframe URL
        iframeObject.setSrc(strURL);
    }
}

By default, when using this solution, the form ribbon lose its context sensitivity. In order to work around this, map the following function to the iframe OnReadyStateComplete event (in the iframe events tab).

function RefreshRibbon()
{
    Xrm.Page.ui.navigation.items.get()[0].setFocus();
    Xrm.Page.ui.tabs.get()[0].setFocus();
}


Sunday, May 24, 2015

Auto Generate Random Number through Javascript


function AutoGenRdmNumber()
{
    var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
    var string_length = 6;
    var randomstring = '';
    for (var i = 0; i < string_length; i++)
 {
        var rnum = Math.floor(Math.random() * chars.length);
        randomstring += chars.substring(rnum, rnum + 1);
    }
    var d = new Date();
    var n = "TR-" + d.getDate().toString() + (d.getMonth() + 1).toString() + d.getHours().toString() + d.getMinutes().toString() + "-" + randomstring;
 
        Xrm.Page.getAttribute("new_trnumber").setValue(n);
   
}