Execute workflow in JavaScript and wait for it to complete

December 17, 2010 by · Leave a Comment 

Sometimes you want to launch a workflow in JavaScript and wait for it to complete. Andriy Butenko wrote a script that would wait for a workflow to complete in JavaScript. Scenario Our customer requested that an email would be created via a workflow and that the user is notified immediately when the email is saved […]

Retrieve one or more fields using FetchXML

December 17, 2010 by · 1 Comment 

This function is used to retrieve multiple fields in MS CRM via fetchXml and return an array containing the requested values. The function requires the following parameters: xml            = fetchXml arrFields   = array of attributes to return When multiple records are found you can request the value of the attribute (example 1), recordcount (example 2) […]

Calculate working days between to two dates

December 17, 2010 by · 1 Comment 

This function can be used to calculate the number of working days between two dates in JavaScript. If needed, holidays can be excluded by passing an array of dates. For a list op all holidays see: http://www.calendardate.com/year2010_holidays.php  or retrieve them from the database using gGetValue() or gFetchValues(). Copy the function in the Onload event and call it […]

Change the display text in a lookup

December 17, 2010 by · 2 Comments 

The following function enables you to change display value of a lookup in MS CRM. In the example below we have a custom entity to register multiple roles/relationships between accounts and contacts. Obviously, one contact can work for multiple accounts at any time or become a member of a society or association. We have modified […]

How to change label width beyond 250 px. in MS CRM

December 17, 2010 by · Leave a Comment 

Sometimes you want to create a questionnaire in MS CRM. See example: However, in MS CRM the max label width within a section is 250 pixels. Fortunately, Mitch Milam  found an interesting (unsupported) way how to increase the label width beyond 250 pixels. 2 Follow the procedure below to change your column label width: Step-by-Step […]

Managing activities in bulk in CRM 2011

December 8, 2010 by · Leave a Comment 

Interesting post about managing activities in bulk in CRM 2011 by Girish Rao on CRM Team Blog such as Bulk Activity Editing Complete multiple activities at once See the complete post on CRM Team Blog.

How to set an attribute’s IsDirty back to false and avoid "Your changes have not been saved" dialog?

December 8, 2010 by · 3 Comments 

Sometimes you need to set a default value on an attribute. When you close the form without making any changes the user will get the “Your changes have not been saved” dialog (In dutch: “Weet u zeker dat u deze pagina wilt sluiten…”). There is a way to avoid this. Place the following code in […]

Workflow Manipulation Library for CRM

December 3, 2010 by · Leave a Comment 

Found this great article in my RSS feeds about a new plugin by Engage to build complex workflows to solve equations, date calculations, manipulates strings, perform regex (regular expression) formatting & matching. You can download the plugin from Codeplex: http://manipulationlibrary.codeplex.com/ There’s also a great explanation here from the folks at Engage that runs down the […]