Posts

Showing posts from October, 2011

Microsoft Dynamics CRM - Working With New Versions of Existing Workflows

Image
Update a workflow for a Release by editing existing and saving as new name in DEV. Set previous workflow versions to Draft status, which CRM will ignore. Repeat steps 1.1 to 1.2.7 above and add/remove/update workflow steps to match new process flow. Note: Export from PROD back to DEV if necessary to ensure same initial version, but only un-publish PROD workflows if during scheduled outage. The reason for un-publishing a workflow prior to export is that imports to different environment may error out in certain scenarios if trying to import a Published workflow.

Microsoft Dynamics CRM - Maintaining Existing Workflows Already in PROD

Image
1. Open the workflow that you want to copy. 2. Un-publish the workflow (careful: if the workflow is in production, you may want to make sure that all open instances of the workflow have completed running and that the workflow will not be needed for the next few steps - best to do this between the hours of 1:00 am and 3:00 am ) 3. Convert the workflow to a template. This is accomplished by opening the unpublished workflow, and selecting "Workflow Template" for the field titled "Publish As" 4. Publish the template: Before you can use the template, you have to publish it. You publish a template in the same manner that you publish a normal workflow (i.e. click the "Publish" button). 5. Create a new workflow. Use the template you just created to create this new workflow. If you wanted to keep your old workflow running while you develop a new one, then go ahead and publish this new one immediately - and then create another new workflow that you will use to make

Microsoft Dynamics CRM - Create, Test, Deploy a Workflow

Image
1.1.1.    Add new workflow in DEV/TST 1.1.2.    MS CRM User Interface represents Workflow in serialized format.  Add each step and label each with corresponding step number in Process Flow Diagram.  1.1.3.    Publish Workflow in DEV/TST and test each scenario as admin first, then as users with appropriate security roles.  Business to confirm each scenario ends as process flow indicates. 1.1.4.    After testing completed successfully and agreed to by the business, temporarily un-publish workflow for Export. 1.1.5.    Export CRM Customizations (or just the Workflow) and check into Source Control. 1.1.6.    Publish workflow again after Export complete to resume functionality in  DEV/TST. 1.1.7.    Steps to deploy on Release Outage: 1.1.7.1. Import Customizations from Source Control into PROD Environment 1.1.7.2. Go To Settings > Workflows and open (double click) on new workflow 1.1.7.3. Edit each child step where ‘red circle with white x’ appears, you must remove references to lookups

Microsoft Dynamics CRM - Enable Context Menu

Image
In CRM, the context menu is disabled incase if we want to View the Source of the page or debug some customizations. To enable the context menu in CRM, we have to update the Global.js. Global.js file resides in the scripts folder under C:\Inetpub\wwwroot\_common. After opening the file, we can search for the document.oncontextmenu() function in Global.js file. Then, we can add the even.returnValue = true; line followed by commenting rest of the lines of that function. The function will look like:   function document.oncontextmenu() {     event.returnValue = true;     /*     var s = event.srcElement.tagName;     (!event.srcElement.disabled &&     (document.selection.createRange().text.length > 0     s == "TEXTAREA"     s == "INPUT" && event.srcElement.type == "text"));     */ }

Microsoft Dynamics CRM - Hiding Navigational Menu Item

Image
To hide a navigational menu in CRM, we need to add some java script in the form onload() event. Let’s say, we want to hide the "View More Addresses" navigational menu item from Accounts. Now, we have to know the Element ID of that menu item. The question is: Where to find the ID? If it was a custom designed form, we could go to the design mode and get the ID of every object of the form. But, being the default CRM form, we can easily find it from “View Source” mode. But, by default CRM doesn’t allow to get the context menu or IE with default toolbar/menu item. The context menu can be enabled by altering Global.js file which I will discuss in the later part of this document. To get the IE menu/Toolbar, we have to play a little trick here. Press Cntrl+N to open the page in IE toolbar mode and then click on Page->View Source. Then perform a text search on the label of that navigational item.  In this case, we searched for "View More Addresses" and found the id="