Browse by Tags

Related Posts
  • Blog Post: MS CRM 2011/2013: Open new email form with To and Regarding fields prefilled

    About a year ago I wrote small article how to open new activity form with Regarding field prefilled. This week I had a similar task but this time I had to write a JavaScript that will open email form with To field prefilled. So here is the script that you can use: function OpenEmail(recordid, recordtypecode...
  • Blog Post: Microsoft Dynamics CRM 2013: Custom Actions walkthrough for .Net and JavaScript developers

    I believe that almost every developer for Dynamics CRM faced with scenario when he/she had to invoke some complex logic on a server side, pass parameters and receive a response back. Before CRM 2013 we used workarounds similar to this one . Once Dynamics CRM 2013 was released we have got solution that...
  • Blog Post: How to turn on Duplicate Detection for client side in Microsoft Dynamics CRM 2013

    Microsoft decided to remove Duplicate Detection feature in 2013 version. Why? Not sure. Following article describes how to restore this functionality. 1. Download SDK for Dynamics CRM 2013 using following link - http://www.microsoft.com/en-us/download/details.aspx?id=40321 2. Unpack it to your hard drive...
  • Blog Post: Microsoft Dynamics CRM 2011: Lookup address by ZIP Code

    This time I had task to write code that lookups address details (country, state and city) by entered postal code. I will share with my results in this post. In my code I used Google Geocoding Webservices . Why? Because I have already tried other geolocating webservices (like Bing) in previous projects...
  • Blog Post: Activity Feeds and Exceptions or How to fix something that should work

    During work I found following logs in event viewer: Exception information: Exception type: CrmException Exception message: Could not find a web resource with name Images/refresh.png. at Microsoft.Crm.Application.Components.Handlers.WebResource.RetrieveWebResource(String webResourceName, String preview...
  • Blog Post: MS CRM 2011: Replacement of textbox with picklist with configurable values

    During the work with CRM 4.0 I used this trick to solve similar tasks. Today I had to implement similar functionality and I decided to go supported way – JavaScript + WebResources. Create a html webresource with following content (I called it xrm_picklist.htm): <!DOCTYPE html PUBLIC "-//W3C/...
  • Blog Post: MS CRM 2011: Open new activity form with ‘Regarding’ field prefilled

    I had a task today to open new task form with Regarding field prefilled. Based on SDK description I tried to use following code to accomplish my task: var params = { regardingobjectid: referenced record id, regardingobjectidtype: referenced record type name, regardingobjectidname: referenced record display...
  • Blog Post: MS CRM 2011: How to refresh Associated or SubGrid from Ribbon button

    Today I have got requirement – create custom ribbon button placed to Associated View of entity, execute some logic and invoke refresh of grid. Last point was the trickiest one and that’s why I decided to share with approach how to do it. First step is to create library that will contain JavaScript that...
  • Blog Post: MS CRM 2011: How to check user rights on client side

    Today I have got requirement to write function which will validate rights of user. In our specific case we had to show/hide buttons on custom web form. I decided to post results of my work here. CheckUserPrivilege = function (privilegeName) { var context = (typeof GetGlobalContext != "undefined"...
  • Blog Post: MS CRM 2011: Strange issue with filtered lookup

    Today I was working with filtered lookup. Before I had no issues with it but today I faced with strange issue. var FetchXml = "" ; var LayoutXml = "" ; Xrm.Page.getControl( "Field Name" ).addCustomView( "00010000-0100-0010-0100-010000010001" , "Entity Logical...
  • Blog Post: MS CRM 2011: N-N Relationship control: checklistbox style

    I have developed WebResource for CRM which displays N-N relation in checklistbox style and decided to share it: Good thing in this control that you don’t need any knowledge of development to use it in your system. Here is instruction how to install it. Prerequisite is N-N relation in your system. For...
  • Blog Post: MS CRM 2011: Embed context report to left navigation pane

    Idea of this blog post is how to embed report to left navigation pane of Crm editing form. I have found this brilliant post which describes how to embed report into IFrame located on Crm editing form and I took this post as basis for current post. First step is to create report which will take current...
  • Blog Post: MS CRM 2011: Extended handling of Save events in Microsoft Dynamics CRM 2011

    About 1.5 ago I wrote post which describes how to work with additional parameters during save of form. I decided to go through all available standard forms and create extended list of available parameters. Here is the list of supported save modes which can be found at following article - http://technet...
  • Blog Post: MS CRM 2011: Bulk refresh of user details from AD

    When you create user in CRM all the available information is populated from AD into CRM user form. But in case information was changed in AD (email box, phone e.t.c.) - information will remain unchanged till the moment you will open form of user and change it. In case a lot of information was changed...
  • Blog Post: CRM 2011: Playing with notes control

    If you want for some reason to allow/disallow user to insert or edit notes in Microsoft Dynamics CRM 2011 following code can help you: function FormatNotesControl ( AllowInsert , AllowEdit ) { var notescontrol = document . getElementById ( 'notescontrol' ) ; if ( notescontrol = = null ) return...
  • Blog Post: Creating a Network Path Text Control for Microsoft Dynamics CRM 2011

    Following approach is a little bit unsupported so be careful using it. Create JavaScript webresource, put in it following code, call OnLoad method to be called during loading of form of your entity: function OnLoad ( ) { Transform ( " new_name " ) ; } function Transform ( fieldid ) { var c...
  • Blog Post: CRM 4.0 - detach answered email from queue

    One of my customers requested following functionality - detach email from queue when email is answered. Solution consists of 2 parts - customization of email (addition of source email field and JavaScipt which will extract id of source email) and Plugin which will handle Send message. Add custom...
  • Blog Post: CRM 4.0 - how to set 'Filter On' filter to value 'All' for Activities/History

    This script is based on amazing article of Michael Holne and updated for CRM 4.0. Just insert following code to OnLoad event handler of form like contact and account. function OverrideClickHandler ( loadAreaId , comboname ) { var navElement = document . getElementById ( 'nav' + loadAreaId ) ;...
  • Blog Post: CRM 4.0 - function which returns current user lookup

    Just for quick access. GetCurrentUserLookup = function ( ) { var xml = "<?xml version='1.0' encoding='utf-8'?>" + "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"...
  • Blog Post: How to allow users to input allowed characters in Microsoft Dynamics CRM 4.0

    I have already posted here how to restrict user to input special characters to text fields. Following script will allow user to input only predefined symbols to text field. Add following script to OnLoad event handler: FilterCharacters = function ( fieldname ) { document . getElementById ( fieldname...
  • Blog Post: Getting Longitude and Latitude using JavaScript for Microsoft Dynamics CRM 4.0 Part 3

    Several days ago I redeveloped geocoding solution . After several days new issues were found. So I decided to search other webservice which will solve this Geocoding solution and stopped at Bing Maps. First thing you have to do is to get key to work with Bing services. This can be done here - https:...
  • Blog Post: Getting Longitude and Latitude using JavaScript for Microsoft Dynamics CRM 4.0 Part 2

    In my previous post I've described how to make possible getting Longitude and Latitude. But chosen webservice was not able to resolve some of addresses. In this post I will describe how to get coordinates using Google API. RefreshCoords = function ( ) { var address = '' ; if ( crmForm . all...
  • Blog Post: Getting Longitude and Latitude using JavaScript for Microsoft Dynamics CRM 4.0

    I've developed this script for my customer - it gets longitude and latitude using webservise http://rpc.geocoder.us/ based on address. The Code: RefreshCoords = function ( ) { var address = '' ; if ( crmForm . all . address1_line1 . DataValue != null ) address = crmForm . all . address1_line1...
  • Blog Post: Extended handling of save event in forms with close dialog (like opportunitites)

    All developers who developed JavaScripts for CRM read this article . But there is no info about getting data from fields of "Close dialogue" (like opportunity close). I've made a little research on this theme and here is the result: First of all - when you close opportunity event.Mode equals...
  • Blog Post: Intergration Google Maps v.3 into Microsoft Dynamics CRM 4.0

    In this post I will describe how to integrate Google Maps v.3 with Microsoft Dynamics CRM 4.0 using IFrame customization. 1. I created simple html page with following code (I called this page MapIntegration.html): < html > < head > < meta name = "viewport" content = "initial...