Archive

Archive for the ‘Customizations’ Category

Customize Marketing List (List Member View)

August 12th, 2009

Hello all,

Today i wanted to customize the ‘All Members’ view on the Marketing List entity and couldn’t. I was stuck for 1 hour trying to figure out how to do this. I stumbled upon http://blogs.msdn.com/crm/archive/2008/04/02/customize-marketing-list-list-member-view.aspx and Jim explained it perfectly.

Answer:

The ability to Customize the List Member View of a marketing list has not been made available in the Customization area of the UI, but can still be achieved with the UI in other means by using the Advanced Find feature.

clip_image002
Fig 1: Marketing List Detail Form displaying “List Member View”

A Marketing List can only be 1 of 3 types, an Account, Contact, or Lead. By default each of these 3 entities has a view associated with it named “All Members”, “Active Members”, and “Inactive Members”. The view that is displayed for the List Member View is based on the marketing list type. For example if the List is an Account type Marketing List, then only the Account entity views of “All Members”, “Active Members”, and “Inactive Members” will be available. The Lead and Contact entities also has these three views, but they will not be available to a Marketing List of type Account.

I will provide an example below of adding a single column only to the “All Members” view for all 3 entities, “Account”, “Contact”, and “Lead” for a total of 3 view modifications. Note: You must have permissions for Customizations to perform the following steps.

How To:

Step 1: Launch Advanced Find

Step 2: When Advanced Find Dialog opens, change the “Look for” Combo box to be “Views”

Step 3: Change the Select Option to “View”, “Equals”

Step 4: Use the Lookup to find “All Members”. NOTE: You will see 3 “All Members” listed in your Lookup window, each one represents an Account, Contact, or Lead “All Members View”. For this example select all three. Optional, you can save your view query for future use.

clip_image004
Fig 2: Advanced Find Dialog

Step 5: Click Find on the Advanced Find Dialog and you should now have a results page listing three “All Members” Views, representing the “All Members” view for an Account, Contact, and Lead. Double Click on Each View to open.

Step 6: When each View is Opened, Select the “Add Columns” button and a property list will appear. Choose a property from the list you want to have displayed as a column by check enabling the box next to the property, in this example I will be choosing the property “E-mail”. Exit the property dialog by clicking ‘OK’ after making your selection.

clip_image006
Fig 4: All Members View for Account after adding the E-mail Column

Step 7: You are free to make other modifications to this View as well, such as column and sort order. Make your changes, Select “Save and Close”, and repeat (if desired) to the other “All Members” views returned by the Advanced Find Query.

Step 8: Important! Finally we need to publish these changes before they can become active. The saved view you modified will appear as an additional item (draft) until it is published and overwrites the existing View. Navigate in the system to ‘Settings’ -> ‘Customization’ -> ‘Customize Entities’. Under the menu Item “More Actions” Select “Publish All Customizations” or you can Use the “Publish” Button.

Important Note: Use the “Publish” button To ONLY publish the highlighted Entity row from the Grid (for example if you customized the memberlist view for Contacts, then select the ‘Contact’ entity item in the grid before pressing Publish. If Using “Publish All Customizations”, be aware that every customization pending in the system will be published!

clip_image008

Result: The List Member View has been modified…

clip_image010
Fig 5: Modified List Member View

MSCRM-Admin CRM 4.0, Customizations , , ,

CRM 4: Adding tooltips to fields on forms

July 14th, 2009

Tooltips are little help messages explaning a field or label (if you hover over a label you will notice a tooltip), I had a requirenment for adding a tooltip to a custom field with some custom help text.

After some digging through i found out the correct JScript property and method:

crmForm.all.my_custom_attribute_c.title = “Add a value here and it should get automatically populated..”;

End Result:

 

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , ,

CRM4: Hiding tabs and sections

June 17th, 2009

Hello all,

I am currently working on a small CRM project and one of the requirements was to hide a section and a tab onLoad.

// Hiding the Contract section

crmForm.all.contractid_c.parentElement.parentElement.style.display=’none’;

// Hide the KB article tab (2nd Tab)

crmForm.all.tab1Tab.style.display=’none’;

I’m sure you can use this in other ways (i.e:. onChange, onClick etc..).

Happy Coding!

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , , ,

Call/Request a workflow in CRM 4.0 using Javascript

May 25th, 2009
  1. Add a button on Form’s Toolbar/Grid’s Menu Bar for the entity in ISV config file (export ISV config)
  2. Call launchOnDemandWorkflowForm (for button on Form) or launchOnDemandWorkflow (for button on grid) functions and pass the parameters sGrid, iObjType and workflowId.
  3. Save the config file and import it to CRM.

An example of this could be:

<Entity name="account">
<ToolBar ValidForCreate="0" ValidForUpdate="1">
<Button Icon="/_imgs/mybutton.jpg" JavaScript="launchOnDemandWorkflowForm('', '10029','{00000000-0000-0000-0000-000000-00000}');" PassParams="1" WinParams="" WinMode="0">
<Titles>
<Title LCID="1033" Text="Send Email" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Send Welcome Email" />
</ToolTips>
</Button>
</Entity>

Or you can alternatively request it from the web service:

/* the function */
ExecuteWorkflow = function(entityId, workflowId)
{
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\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
GenerateAuthenticationHeader() +
" <soap:Body>" +
" <Execute xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
" <Request xsi:type=\"ExecuteWorkflowRequest\">" +
" <EntityId>" + entityId + "</EntityId>" +
" <WorkflowId>" + workflowId + "</WorkflowId>" +
" </Request>" +
" </Execute>" +
" </soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Execute");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
return(resultXml.xml);
}

// call the workflow
var theWorkflowId = "3FD2DD58-4708-43D7-A21B-F0F90A0AA9F2"; //change to your workflow Id
ExecuteWorkflow(crmForm.ObjectId, theWorkflowId);

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , , ,

Add a Button to a Form

May 23rd, 2009

This post is to show how to add a Button to a MS CRM Form, not to the Navigation Pane nor to the Menu Bar, but to the actual Form itself.
In this post I will show a simple usage of the Button, to show its function. You can understand that more advanced functions can be triggered by the button, but that’s not the aim of this post.For this example I have used the default Contact Form. The Address Section is hidden onLoad and a Button is shown.

Button on Form

By Clicking on the Button the Section with the Address Details is shown again. In this example the Button Disappears, because it has no use anymore. (I could have added a function to hide the section again).

Button on Form2

To achieve the above I have created a new Section with a new Attribute (new_button).

Button on Form3

Next to that I placed the following Script in the onLoad of the Form:

Update: 9th March 2010 - updated code blocks - wordpress broke the code!

// Start of onLoad Code

//to hide the address details onload
crmForm.all.address1_name_c.parentElement.parentElement.parentElement.style.display = 'none';

// Replace the attribute new_button with the button and create a link to the onclick function
function CreateButton() {
var fieldTable = crmForm.all.new_button_d;
var html = "<table border='0' cellspacing='0' cellpadding='0'><tr><td width='0px'>" + fieldTable.innerHTML + "</td><td width='200px'><input type='button' value='Show Address Details' onclick='Button_OnClick()' style='background-color:#d8e8ff' style ='border-width:2px'/></td></tr></table>";
fieldTable.innerHTML = html;
//hide the new_button attribute
document.all.new_button.style.display='none';
crmForm.all.new_button_c.innerText="";
}
// Function to be triggered onClick
Button_OnClick = function() {
//to show the address details
crmForm.all.address1_name_c.parentElement.parentElement.parentElement.style.display ='block';
//In this case I hide the button, because I haven't added the button has not function anymore in this case
crmForm.all.new_button_c.parentElement.parentElement.parentElement.style.display ='none';
}
// Initialization: Execute the selected sample
CreateButton();

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , , ,

Recommended Microsoft CRM 4.0 Books

May 23rd, 2009

Hi All,

I would like to recommend to you some of the books i have read in regards to Microsoft Dynamics CRM 4.0.

Working with Microsoft Dynamics(TM) CRM 4.0 (Paperback)

Working with Microsoft Dynamics CRM 4.0
by Jim Steger (Author), Mike Snyder (Author)

Product Description
Get a practical introduction to Microsoft Dynamics CRM now updated for Microsoft Dynamics CRM 4.0. Microsoft Dynamics CRM is a value-packed customer-relationship management (CRM) solution for small- and mid-market businesses. The latest version adds workflow management capabilities, and will be delivered as an on-demand service through Microsoft® Office Live. With topics that include developing new functionality, designing implementations, and integrating Microsoft CRM with other business applications including Microsoft Office Outlook®, Microsoft Office InfoPath®, and Microsoft SharePoint® Products and Technologies this is one of the only books written for both developers and those who implement business solutions. Authored by experienced practitioners, this book provides case studies, integration and performance guidelines, and toolsets the information you need to help you create successful CRM solutions. This book also explains how to maintain Microsoft Dynamics CRM 4.0, making it of interest to IT professionals who support Microsoft Dynamics CRM 4.0 users. And power users will learn how to customize individual Microsoft Dynamics CRM 4.0 experiences. Key Book Benefits: Delivers practical information from expert authors who have deployed, customized, and maintained Microsoft Dynamics CRM in the field Provides case studies, integration and performance guidelines, and toolsets Includes code samples, and demo data will be available on the Web

About the Author
Mike Snyder and Jim Steger are co-founders and principals at Sonoma Partners, a consulting firm specializing in Microsoft CRM implementations. Sonoma Partners was named top Global Microsoft CRM Partner in 2003 and 2005. Recognized as one of the industry s leading CRM experts, Mike authors several popular newsletters and blogs about Microsoft CRM. Jim architected and led multiple award-winning Microsoft CRM deployments, including complex enterprise integration projects. He s been developing and writing code for Microsoft CRM since the version 1.0 beta.

More info: http://www.amazon.com/Working-Microsoft-Dynamics-CRM-4-0/dp/0735623783/ref=sr_1_1?ie=UTF8&s=books&qid=1243087339&sr=1-1

Microsoft Dynamics CRM 4.0 Unleashed (Paperback)

MSCRM Unleashed

by Marc J. Wolenik (Author), Damian Sinay (Author)

Product Description

Microsoft® Dynamics CRM 4.0 Unleashed presents start-to-finish guidance for planning, customizing, deploying, integrating, and managing Dynamics CRM in your unique business and technical environment. Authored by two leading Microsoft Dynamics implementers, this book systematically explains how the system works, why it works that way, and how you can leverage it to its fullest advantage.

 

The authors present clear examples, proven best practices, and pitfalls to avoid in using every significant Dynamics CRM capability. The far-reaching coverage ranges from Dynamics CRM’s sales, marketing, and customer service features to its automated workflows; from Outlook and Office integration to reporting and security. The authors offer independent insight into Dynamics CRM’s most powerful new features, from its improved interface to its new mail merge and data migration tools.

 

This book is for every IT professional who intends to work with Dynamics CRM, regardless of their experience with Dynamics or other CRM solutions. The authors provide example-rich, realistic coverage of advanced Dynamics customization, extensibility, and integration: information that is available nowhere else.

 

Detailed information on how to…

  • Set up, configure, and maintain all facets of Dynamics CRM in any organization or industry
  • Thoroughly understand both the on-premise and hosted versions of Dynamics CRM
  • Make the most of Dynamics’ new features, including email, the Outlook client, Internet Facing Deployment (IFD), and relationships
  • Manage sales leads, opportunities, accounts, contacts, marketing lists, sales collateral, campaigns, quotes, orders, and invoices
  • Improve customer service by integrating schedules, cases, contacts, product/service information, and more
  • Build powerful automated workflows that streamline key sales tasks and liberate salespeople for more effective selling
  • Efficiently administer and secure any Dynamics CRM implementation
  • Drive greater value by integrating Dynamics CRM with Microsoft Office productivity tools
  • Customize and extend Dynamics CRM using Visual Studio, .NET, and custom plug-ins and add-ons

ON THE WEB:

Download all of this book’s examples and source code at informit.com/title/9780672329708

About the Author

Marc J. Wolenikis founder and CEO of Webfortis, a Northern California consulting company and Microsoft Gold Certified Partner that specializes in solutions built with Dynamics CRM. He has extensive experience with CRM implementation, integration, and migration for companies of all sizes, and is deeply involved in building custom vertical solutions around the Dynamics platform.

 

Damian Sinayis a Webfortis partner. Currently a development manager with senior .NET development responsibilities, he has extensive experience working with all Dynamics CRM technologies. He has participated in Dynamics CRM projects involving extremely complex customizations, integrations, and implementations.

 

More info: http://www.amazon.com/Microsoft-Dynamics-CRM-4-0-Unleashed/dp/0672329700/ref=sr_1_1?ie=UTF8&s=books&qid=1243088206&sr=1-1

Programming Microsoft Dynamics CRM 4.0 (Pro-Developer)

programing ms crm 4.0

by Mike Snyder (Author), Jim Steger (Author), Brad Bosak (Author), Corey O’Brien (Author), Phil Richardson (Author)

Product Description
Announcing a fully revised second edition of this popular SELF-PACED TRAINING KIT designed to help maximize your performance on 70-536, a core exam for the MCTS and MCPD certifications. This 2-in-1 kit includes the official Microsoft study guide, plus practice tests on CD to help you assess your skills. It comes packed with the tools and features exam candidates want most including in-depth, self-paced training based on final exam content; rigorous, objective-by-objective review; exam tips from expert, exam-certified authors; and customizable testing options. It also provides real-world scenarios, case study examples, and troubleshooting labs for the skills and expertise you can apply to the job. Focusing on the fundamentals of .NET application development, this official study guide covers using system types, collections, and generics to help manage data; validating input, reformatting text, and extracting data with regular expressions; developing services, application domains, and multithreaded applications; enhancing your applications by adding graphics and images; implementing code access security, role-based security, and data encryption; working with serialization and reflection techniques; instrumenting your applications with logging and tracing; and interacting with legacy code using COM Interop and PInvoke. Work at your own pace through the lessons and lab exercises. Then assess yourself using 300+ practice and review questions on the CD, featuring multiple, customizable testing options to meet your specific needs. Choose timed or untimed testing mode, generate random tests, or focus on discrete objectives. You get detailed explanations for right and wrong answers including pointers back to the book for further study. You also get an evaluation version of Microsoft Visual Studio® 2008 software and an exam discount voucher making this kit an exceptional value and a great career investment.

Key Book Benefits

Comprehensive exam prep study guide In-depth coverage of exam objectives and sub-objectives plus instructive case studies and troubleshooting scenarios to enhance your performance on the job 300+ practice and review questions Test engine that enables customized testing, pre-assessment and post-assessment, and automated scoring and feedback Microsoft Visual Basic and Visual C# code samples on CD Handy exam-mapping grid Evaluation version of Visual Studio 2008 software 15 percent exam-discount voucher from Microsoft (limited time offer) Entire study guide in searchable eBook format

About the Author
Tony Northrup, MCTS, MCSE, CISSP, and Microsoft MVP, is a consultant and author. He is coauthor of the SELF-PACED TRAINING KITS for a wide range of .NET Framework, Windows Server 2008, Windows Vista, and Windows XP certification exams.

More info: http://www.amazon.com/Programming-Microsoft-Dynamics-CRM-Pro-Developer/dp/0735625948

MSCRM-Admin CRM 4.0, Customizations, Deployment, General, Licensing, Plug-ins, SDK , , , , , , ,

CRM 4.0: Notes Count on any Entity

May 20th, 2009

NotesCount is a client side JScript customization, which enables CRM useres to recognize the amount of attached notes or attachments to any CRM record (e.g. contact, account, case, …) within the tab on top of the main form of the record.
Intention
NotesCount is intended to improve the UX of all Microsoft Dynamics CRM 4.0 users. By showing the amount of attached notes or files referenced to CRM records without opening the notes tab it will reduce the risk to miss important information.

screenshot 

More info & Download: http://notescount.codeplex.com/

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , ,

Remove ‘Resource Center’ from CRM4.

May 18th, 2009

Hi All,

If you would like to remove the ‘Resource Center’ menu navigation area in CRM, just do the following:

  1. Export the SiteMap customizations from CRM.
  2. Unzip the file, then open the XML file and scroll to the end of the file and look for:
  3. Highlight the the whole <area id=”ResourceCenter”> node and delete.
  4. Save the XML file.
  5. Re-Upload into CRM.
  6. Clear IE cache and refresh - You should no longer see the navigation.

Any suggestions or comments welcome!

MSCRM-Admin CRM 4.0, Customizations , , , , , , ,

Show no. of open or closed activities (history) on the CRM form.

May 18th, 2009

Hello all,

Have you ever wanted to see the total no. of outstanding/completed activities on a Case, Account, Opportunity, Contact etc..?  

Well now you can, simply add the following JavaScript code to the onLoad event of the entity, it will query the webservice and it will give you the exact count of open/closed activities.

Update: 9th March 2010 - I have updated the code below and tested.

// this code is to get the number of activities and historical activities.
var buXml = GetRegardingActivity();
if(buXml != null)
{
    var buNodes = buXml.selectNodes("//BusinessEntity/q1:statecode"); // CRM 4.0
    var iActivity = 0;
    var iHistory = 0;

    if(buNodes != null )
    {
        /*get values*/
        for( i = 0; i < buNodes.length; i++)
        {
            switch(buNodes[i].text)
            {
                case "Open" : iActivity++; break;
                case "Scheduled" : iActivity++; break;
                case "Completed" : iHistory++; break;
                case "Canceled" : iHistory++; break;
            }
        }

        if(document.getElementById('navActivities') != null)
        {
            document.getElementById('navActivities').getElementsByTagName('NOBR')[0].innerText = document.getElementById('navActivities').getElementsByTagName('NOBR')[0].innerText + " (" + iActivity + ")";
        }

        if(document.getElementById('navActivityHistory') != null)
        {
            document.getElementById('navActivityHistory').getElementsByTagName('NOBR')[0].innerText = document.getElementById('navActivityHistory').getElementsByTagName('NOBR')[0].innerText + " (" + iHistory + ")";
        }
    }
}

function GetRegardingActivity()
{
    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" xmlns:xsd="http://www.w3.org/2001/XMLSchema">" +
    GenerateAuthenticationHeader()  +
    " <soap:Body>" +
    "<RetrieveMultiple xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+
    "<query xmlns:q1='http://schemas.microsoft.com/crm/2006/Query'"+
    " xsi:type='q1:QueryExpression'>"+
    " <q1:EntityName>activitypointer</q1:EntityName>" +
    " <q1:ColumnSet xsi:type="q1:ColumnSet">" +
    " <q1:Attributes>" +
    " <q1:Attribute>statecode</q1:Attribute>" +
    " </q1:Attributes>" +
    " </q1:ColumnSet>" +
    " <q1:Distinct>false</q1:Distinct>" +
    " <q1:Criteria>" +
    " <q1:FilterOperator>And</q1:FilterOperator>" +
    " <q1:Conditions>" +
    " <q1:Condition>" +
    " <q1:AttributeName>regardingobjectid</q1:AttributeName>" +
    " <q1:Operator>Equal</q1:Operator>" +
    " <q1:Values>" +
    " <q1:Value xsi:type="xsd:string">" + crmForm.ObjectId + "</q1:Value>" +
    " </q1:Values>" +
    " </q1:Condition>" +
    " </q1:Conditions>" +
    " </q1:Criteria>" +
    " </query>" +
    "</RetrieveMultiple>"+
    " </soap:Body>" +
    "</soap:Envelope>" +
    "";

    var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
    xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
    xmlHttpRequest.send(xml);

    var resultXml = xmlHttpRequest.responseXML;
    return resultXml;
}

Any comments or suggestions are welcome!

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , , ,

Add custom toolbar buttons to the Case Entity form.

May 17th, 2009

Hi All,

Have you ever wanted to add some toolbar buttons to the CASE/CONTACT/ACCOUNT form?

Well now you can, you can use the ISV.config provided by CRM.

  1. Export the ISV Config Customizations from CRM
  2. Edit the XML file
  3. Find the <entity name=”incident”> node and add the following - I couldn’t paste the XML because of wordpress limitations.

  4. Note: the following are custom images: taskicon.gif, emailicon.gif and phonecallicon.gif.

  5.  Save the XML and import into CRM and publish the customizations.

Code explantion:

JavaScript="locAddActTo(4210)" PassParams="0" WinParams="" WinMode="0" Client="Web, Outlook" AvailableOffline="true"

Here we are using the CRM javascript function locAddActTo() and using the entity identifier (this being a phone call) which is located in the SDK and we are telling CRM to show this button is Outlook and the web version of CRM

JavaScript="resolve();" PassParams="0" WinParams="" WinMode="0" Client="Web, Outlook" AvailableOffline="true"

We are using the resolve() function on the case entity form which will resolve the case like you would when going to the actions menu > resolve case

MSCRM-Admin CRM 4.0, Customizations, JavaScript , , , ,