Posts

CRM 2011 SMS custom activity Characters Remaining field

Paul Nieuwelaar in his blog has implemented some javascript for the characters remaining field. This saves me a lot of time from reinventing the wheel. All I then did was to set the default value to the field (160 characters for SMS). Also make sure that you put the 160 limit on the multiline textbox, but leave the minimum value for the charactersremaining field to be -20000000 to avoid the annoying message box. Hope this helps, Andreas

CRM 2011 disable lookup type for customer field or partylist

Sometimes we want to lock the lookup type for customer field type or partylist type. To do this, use the javascript (e.g. Account Type only): Hope this helps, Andreas

CRM 2011 Export Entities Tabs and Sections Name

CRM does not provide a functionality to list all your tab and section names. With the help of SQL XML parsing feature, I managed to create an sql script to read the FormXML of the entities and parse out the tabs and sections name. This is useful if you want to see all the tabs and sections that you have added. Enough said, this is the script: Hope this helps, Andreas

CRM 2011 Ajax Loading Message Screen with JQuery

Image
When you use ajax request in CRM2011 (for example, the OData call), the user is not notified when this process happens in the background. Although this call is relatively fast, sometimes you can't predict the performance of it and you want some kind of notification that lets the user know what's happening. Fortunately with the power of JQuery you can easily make this happen. In my case, I have a custom 'Create Opportunity' button on my custom entity form that gets the data from that entity (and related entity) and create opportunity with those data. When creating the opportunity using the OData way, I will show the loading message popup with the animated OOTB CRM progress gif image. To make this happen, it's simple. Just put this function into your onLoad form: You notice the center() method above. This is an add-on to the jQuery method that you can safely put on your jQuery file: That's it. Now whenever there is an Ajax call on the form, you will...

CRM 2011 JQuery OData REST Endpoints Create Record

In CRM 2011, we can create record easily using JQuery and OData. This will get triggered asynchronously using the ajax functionality. Create Record function from the SDK: To create new record, you just need to instantiate your object and call the function. The tricky part is when you want to assign Lookup field or OptionSetValue. You can get more info on this from the SDK itself. Here is an example:

CRM 2011 Javascript Fetch XML synchronous or asynchronous call

Using helper function to execute FetchXML request is great. The code below is retrieved from this blog , and all I had to do is to add extra logic when parsing the XML result because I want to grab the attributes from the related entity as well. Modified FetchUtil.js: To use it you just need to do it like this (synchronous) If it's asynchronous the last bit will be: The parsed result object can be queried like this: Hope this helps, Andreas

CRM 2011 Import Custom Workflow Error - Assembly must be registered in isolation

This error does not tell much, but I fixed it by adding myself as a Deployment Administrator. Hope this helps, Andreas