Tuesday, 29 April 2014

List of Reports and Workflows

Workflows- Run against the *_MSCRM database 

SELECT name , createdbyname,createdon,statuscodename
    FROM FilteredWorkflow

Reports run against the ReportServer database 
Select   [Name],
               [Description],
               SubString([Path],1,Len([Path]) - (CharIndex('/',Reverse([Path]))-1)) As [Path],
               Case
                        When [Hidden] = 1
                        Then  'Yes'
                        Else    'No'
               End As [Hidden]
From    [Catalog]
Where  [Type] = 2
Order By SubString([Path],1,Len([Path]) - (CharIndex('/',Reverse([Path]))-1)),
               [Name]

Wednesday, 9 April 2014

Increase the attachment size to 10mb CRM 4

The default attachment file size limit in Microsoft Dynamic CRM 4.0 is 5 MB.  There is good reason for this - as a general rule you should be placing some restrictions on the amount of file data that can enter CRM so that the database can maintain a reasonable size and so that performance is optimized. However, your business may find the need to increase this size a little in order to handle larger file attachments.  Here are the instructions to increase the file size limit to 10 MB.  You can go larger than this, but pay close attention to the table size and performance over time as you want to keep CRM running as well as possible. Note - even though the System Settings option looks like this it would apply to email attachments only, it does apply to "notes" type attachments as well.  Finally, this procedure to change the max attachment size is not an officially published recommendation, so use this at your own risk. How to increase the max attachment size in CRM 4.0:

1.           Open the application web.config (C:\Inetpub\CRM\web.config).

2.           Locate the <httpRuntime> key within the <system.web> element and change the values to the following:
<httpRuntime executionTimeout="9999" maxRequestLength="10240"/>
3.           Locate the <httpRuntime> key within the <system.web> element of the <location path='MSCRMServices"> element, and change it to the following:
<httpRuntime maxRequestLength="10240"/>
4.           Save and close the web.config.

5.           Open the CRM web application (http://crm).

6.           Navigate to Settings | Administration | System Settings.

7.           Click the E-mail tab.

8.           Change the maximum file size (in kilobytes) field to 10240.

9.           Click Ok to save the changes.


10.        Perform IISReset. 

Tuesday, 1 April 2014

CRM 2013 Javascript Special Functions


  • Xrm.Page.context.client.getClient() – Returns client type i.e. outlook, web or mobile.
  •  Xrm.Page.context.client.getClientState() – Returns client state i.e. online or offline.
  • Xrm.Page.data.refresh() – This is one interesting as it refreshes the data on the form without even reloading the page. This also enables developers to pass a callback method.
  • Xrm.Page.data.save() – Save the form
  •  Xrm.Page.data.getIsValid() – Returns true is form is valid for save else false
  •  Xrm.Page.data.setFormDirty() – Sets the form dirty for force save.
  •  Xrm.Page.data.entity.getPrimaryAttributeValue() – Returns the value of primary attribute
  • Xrm.Page.ui.setFormNotification(message,level,uniqueId) – Sets the notification on top of the form.
  • Xrm.Page.ui.clearFormNotification() – Clears the form notification
  • Xrm.Page.ui.refreshRibbon() – Refreshes the ribbon. This method does not work on CRM for tablets.
  •  Xrm.Page.getControl(“field_name”).setNotification(“Notification”) – Sets the notification for a specific field right next to the field label. This can often be used as a custom tool tip.
  • Xrm.Page.getControl(“new_name”).clearNotification() – Clears the notification
  •  Xrm.Page.getAttribute(“new_precision”).setPrecision(2) – Override field precision
  •  Xrm.Page.getControl(“createdon”).setShowTime(true) – Toggle show time at form
  •  Xrm.Page.getControl(“field_name”).addCustomFilter(fetchFilter, entityType) – Allows developer to add custom filter to a lookup view.
  • Xrm.Page.getControl(“field_name”).addPreSearch(handler) – adds pre trigger filter to the lookup.
  • Xrm.Page.getControl(“ownerid”).removePreSearch(handler) – removes the trigger
  •  Xrm.Utility.openWebResourceDialog(webResourceName, webResourceData, width, height) – opens a sepecified webresource as a web dialog window.