Monday, August 2, 2010

How to add images/HTML to Microsoft CRM E-Mail

The Microsoft CRM e-mail templates are HTML and browser-based. As a result, the following requirements must be met to include a graphic in a template:

  • You must be able to display the graphic/Image in a browser. This means that .gif and .jpg graphic formats work best.
  • The e-mail template is an HTML file. Graphics/Images are not “embedded” or attached; rather, only a link is placed in the file pointing to where the actual graphic/Image is located.
  • The graphic/Image must be on a Web site that the e-mail recipient can access.

To add a graphic to an e-mail template:

  1. On the Microsoft CRM Home page, click Settings, click Template Manager, and then click E-mail Templates.
  2. On the Actions bar, click New E-mail Template.
  3. Select a template type and click OK.
  4. Complete the details of the e-mail template.
  5. Open the Web page (using Internet Explorer) or Web site folder (using Windows Explorer) that contains the graphic. Usually all the graphics for a Web site are located in one folder. Links to the graphics in this folder are then placed in the Web files.
  6. Copy and paste the graphic to your e-mail template. Although the graphic will appear, you have copied and pasted only the link to that graphic.
  7. Save the e-mail template.

Now you have the desired email template that could be utilized in your Marketing Campaigns.

Hats off to the beautiful post By Marcello Tonarelli

Thursday, July 29, 2010

First Look at Microsoft Dynamics CRM 2011 codenamed Microsoft Dynamics CRM 5

At the Microsoft WPC conference there was a session called “Taking the Covers Off of Microsoft Dynamics CRM 5”. will be publicly available as a beta release in September 2010 for both online and on-premises deployments. Key Things from the session are :

  1. Microsoft Dynamics CRM 5 is now branded as Microsoft Dynamics CRM 2011.
  2. The key message for CRM 2011 will be the "Power of Productivity"
  3. Microsoft is expanding the global availability of CRM Online now it Will include 8 additional markets 40 markets, 41 languages at the end of 2010.
  4. CRM 2011 will help you manage both customer AND custom relationships.
  5. You can convert an email to Opportunity directly.
  6. CRM 2011 now provides native Outlook access to CRM data (it isn't just an Iframe to the web client like CRM 4.0), benefits include:
    • You can drag columns to reorder, add/remove, use groups, etc.
    • You can toggle the reading pane settings
    • Drag/drop form sections on a personal basis
  7. CRM 2011 allows you to package your customizations into solutions (instead of one giant munged pile of customizations like CRM 4.0):
    • Solutions consist of more than entities, also includes security roles, reports, dashboards, plug-in assemblies, etc.
    • Developers can work with .NET 4.0 framework
    • Can be managed/unmanaged
  8. "processes" (sometimes referred to as scripts or dialogs). This is a huge new feature that a lot of customers ask for in 4.0.
  9. You can now create custom activity types in CRM 2011. Big-time benefit!
  10. CRM 2011 includes field level security! (yeppie… My Favorite)
  11. CRM 2011 will have multiple forms per entity. Yes!!!!!!!!!!

Have a first look in this hour-long exploration of Microsoft Dynamics CRM 5 and see for yourself what all the excitement is about! We dive deep into the new product, discuss strategies for managing upgrades and explore all the opportunities to make the most of this exciting new release. If you’re a long-time Microsoft Dynamics CRM partner, or a BPOS or SharePoint partner looking to engage in the CRM space, this is a session you won’t want to miss.

Speakers: Andy Bybee, Bryan Nielson, Jason Hunt at digitalwpc

Get Microsoft Silverlight

Monday, July 12, 2010

MSCRM 4 - Remove 'Add Existing xxxxx to this record' button

In our CRM implementation where we created several custom entities. It displayed an 'Add Existing xxxxx to this record' button when it was not required and created a lot of confusion among the users. I tried to remove them and like always instead of reinventing the wheel I binged it and then this come to my rescue and within minutes the needful was done. Thanks Dave and 'Dynamic Methods' for this beautiful post. the code that was posted there is :

HideAssociatedViewButtons('new_business_new_surveys', ['Add existing Survey to this record', 'Add a new Survey to this record']);
HideAssociatedViewButtons('new_account_new_eventinvite', ['Add existing Event Invite to this record']);

function HideAssociatedViewButtons(loadAreaId, buttonTitles){
var navElement = document.getElementById('nav_' + loadAreaId);
if (navElement != null) {
navElement.onclick = function LoadAreaOverride() {
// Call the original CRM method to launch the navigation link and create area iFrame
loadArea(loadAreaId);
HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles);
}
}
}

function HideViewButtons(Iframe, buttonTitles) {
if (Iframe != null ) {
Iframe.onreadystatechange = function HideTitledButtons() {
if (Iframe.readyState == 'complete') {
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');

for (var j = 0; j < buttonTitles.length; j++) {
for (var i = 0; i < liElements.length; i++) {
if (liElements[i].getAttribute('title') == buttonTitles[j]) {
liElements[i].style.display = 'none';
break;
}
}
}
}
}
}
}

Friday, May 14, 2010

When do asynchronous jobs fail, suspend or retry?

 

Gonzalo Ruiz wrote an excellent article on When do asynchronous jobs fail, suspend or retry? When the CRM Asynchronous Processing Service gets an error, there are three possible actions it will take depending on the type of error:

  • Fail: Job cannot be resumed.
  • Retry: Job will be paused and retried after a period of time.
  • Suspend: Job will be suspended until it is manually resumed.

The entire error handling mechanism is rather complex but I thought of writing down some general rules that will help understanding what the outcome action will be depending on the error that occurs inside the asynchronous job:

Scenario

Async job

result action

Workflow

result action

Error code

An SDK call fails: Infinite loop detected

Fail

80044182

An SDK call fails: Organization disabled

Retry

8004A104 / 8004A107

An SDK call fails: Server is busy

Retry

8004A001

An SDK call fails: Other

Fail

Suspend

 

SQL exception is thrown

Retry

80040216

Workflow system is paused

N/A

Suspend

80045017

Network error

Retry

80044306

Record associated with workflow cannot be found

N/A

Suspend

80045031

The HTTP response fails with code HttpStatusCode.Unauthorized

Suspend

80044306

The HTTP response fails

Retry

80044306

Plugin or workflow activity throws an InvalidPluginExecutionException

Fail

80040265

Anything else

Fail

 

Please note that the table above can be used as a general guide but might not cover all scenarios, some exceptions to these actions might apply and it might go outdated in the future.

Why do workflows have a different behavior than other asynchronous jobs when an SDK call fails?

Because the user might be able to fix the problem and resume the workflow. For example, a workflow step sends an email to an account. If the account has no email address, the workflow will suspend with error message "This message cannot be sent to all selected recipients. The e-mail address for one or more recipients is either blank or not a valid e-mail address".

The user can add the email address to the account and resume the workflow. The reason why other asynchronous jobs fail instead is because while workflows are sometimes manipulated by end users, other asynchronous jobs are more oriented towards the system administrator or customizer.

When the result action is Retry, for how long will the job pause before automatically retrying and how much time is there between retries?

The "PostponeUntil" attribute of the asynchronous operation corresponds to the next time it will be retried. The “PostponeUntil” attribute can be retrieved using the SDK. The amount of time to wait until the next retry is calculated considering some deployment settings and grows exponentially on the number of retries. The calculation uses a complex algorithm but these are some default outputs as a function of the RetryCount (the number of times the operation has been retried before):

RetryCount

Time to wait (seconds)

0

36

1

43

2

52

3

62

4

75

>= 5

Suspend

Note that by default, any asynchronous operation retrying 5 or more times will be suspended.

When a job has statusreason "Waiting" and statecode "Suspended", how do I know if it will retry or if it is suspended until it is manually resumed?

You can check the "PostponeUntil" attribute of the asynchronous operation to see the time and date in which it will be automatically resumed. If this value is equal to 9999-12-30 23:59:59 (maximum DateTime value) it means that it is waiting to be manually resumed.

How can I retrieve the “PostponeUntil” attribute of the asynchronous operations?

Because the “PostponeUntil” attribute is not available from the entity form or advanced find, you will need to use the SDK to retrieve this value. The following code sample prints the date and time at which each suspended asynchronous job will resume and the number of times it has been retried.

   1: static void Main(string[] args)


   2: {


   3: CrmAuthenticationToken token = new CrmAuthenticationToken();


   4:     token.AuthenticationType = 0;


   5:     token.OrganizationName = "AdventureWorksCycle";


   6:     CrmService service = new CrmService();


   7:     service.Url = "http://crmserver/mscrmservices/2007/crmservice.asmx";


   8:     service.CrmAuthenticationTokenValue = token;


   9:     service.Credentials = System.Net.CredentialCache.DefaultCredentials;


  10:  


  11:     QueryByAttribute query = new QueryByAttribute();


  12:     query.Attributes = new string[] { "statecode" };


  13:     query.ColumnSet = new ColumnSet(new string[] { "postponeuntil", "retrycount" });


  14:     query.EntityName = EntityName.asyncoperation.ToString();


  15:     query.Values = new object[] { (int)AsyncOperationState.Suspended };


  16:     BusinessEntityCollection bec = svc.RetrieveMultiple(query);


  17:     foreach (BusinessEntity be in bec.BusinessEntities)


  18:     {


  19:         asyncoperation op = (asyncoperation)be;


  20:         string result = String.Format("Operation id={0} PostponeUntil={1} RetryCount={2}",


  21:              op.asyncoperationid.Value,


  22:              op.postponeuntil.UniversalTime,


  23:              op.retrycount.Value);


  24:         Console.WriteLine(result);




Microsoft Dynamics CRM SDK 4.0.12 Available

 

Microsoft Dynamics CRM SDK 4.0.12 is now available for download! This update contains some very exciting additions:

Advanced Developer Extensions

Advanced Developer Extensions for Microsoft Dynamics CRM, also referred to as Microsoft xRM, is a new set of tools included in the Microsoft Dynamics CRM SDK that simplifies the development of Internet-enabled applications that interact with Microsoft Dynamics CRM 4.0. It uses well known ADO.NET technologies. This new toolkit makes it easy for you to build an agile, integrated Web solution!

Advanced Developer Extensions for Microsoft Dynamics CRM supports all Microsoft Dynamics CRM deployment models: On-Premises, Internet-facing deployments (IFDs), and Microsoft Dynamics CRM Online. The SDK download contains everything you need to get started: binaries, tools, samples and documentation.

Authentication for Microsoft Dynamics CRM Online

New authentication documentation and sample code for Microsoft Dynamics CRM Online is added in this release that does not require using certificates, making it easier for you to write code for your online solutions.

There are quite a few other updates in this version of the SDK package. Refer to the release history on the first page of the CHM for a complete list.

Enjoy!

Microsoft launches the Customer Care Accelerator for Dynamics CRM 4.0

The Customer Care Accelerator (CCA) for Microsoft Dynamics CRM focuses on delivering contact center enabling functionality, such as the ability to create a unified desktop by combining data elements from disparate line of business applications and displaying it in a single user interface. The core Customer Care business scenarios highlighted by this accelerator include the following:
Integrated desktop: Customers can aggregate information from diverse business applications into an integrated desktop providing employees with a 360° view of the customer interactions. Customer service representatives have immediate access to business critical information to serve customers quickly and efficiently, increasing customer satisfaction and loyalty.
Eliminating Duplicate Data Entry: Organizations can streamline business processes by creating desktop automation workflows. Process automation eliminates the need for agents to re-enter the same data in multiple applications. Minimizing duplication helps to reduce human error and ensures a consistent customer service experience.
Computer Telephony Integration (CTI): (This is the feature I am most interested in) Organizations are provided with a consistent framework to connect CTI systems with key line of business applications. CCA provides out of the box CTI integration with the major soft and hard phone providers – many of which already have their native integration offerings to Microsoft Dynamics CRM. Also includes is integration to Bing Maps and the Office Communications server so agents can leverage an Expert on Call by opening a chat window and bring in the contextual information from the customer session into the assisted chat. The Dynamics CRM customer care accelerator also provides session management where an agent can 'park' a customer session and then come back to it.
Activity Reporting: Contact center managers have swift access to agent desktop transaction reporting, helping them to identify process bottlenecks. It Provide visibility into agent activities using out of the box and custom reports. you can download a copy to evaluate and play with it from here.

Friday, April 23, 2010

How to use the Data Enrichment (re-import) feature in Microsoft Dynamics CRM 4.0 (although officially, it doesn’t exist…)


The Data Enrichment feature allows updating existing data by exporting it from Microsoft Dynamics CRM 4.0 to Excel, modify it in externally and then re-import it, updating the existing records with the new data. This feature is very useful in scenarios where mass update is required for existing data or when you need an external party to add data to your existing CRM records.

Unfortunately, this useful feature was removed from the Microsoft Dynamics CRM 4.0 RTM version. I am not sure why, some claim it is potentially harmful and can make a mess of existing data.

The surprising news is that you can still use this non existing feature. How? Here is an example:

In this example scenario, I want to update all my contacts with new data: email address.

  1. Select an existing view or edit a new view using the Advanced Find. Make sure the columns you want to add data to are included
    Select records to export

  2. Export the view data using the ‘Export to dynamic worksheet’ option and save it.
    Select export type
  3. Open the exported file, select all records, go to the Format menu, select Column sub menu and then the Unhide option. A new column should appear, containing the records GUIDs.
    Select all data
    Unhide the GUID column
  4. Rename the GUIDs Column to the name of the exported entity for example ‘Contact’. Move the column to the left of all other columns.
    Move GUID column to the far left
  5. Update the required data. In this example, the email data is added to the existing records.
    Add the new data
  6. Save the Excel file as .csv file.
  7. Use the Import Wizard tool in Microsoft Dynamics CRM 4.0 to import the newly created .csv file. Select ‘none’ for Data Delimiter, ‘Comma (,)’ for field Delimiter. 
    Select file and delimiters in data import wizard
  8. Click next and select the exported entity, ‘Contact’ in this example. You can see the ‘Enrich data by updating records rather than creating new records.’ option available and checked. Select a data map if required and click next
    Notice the checked Enrich data option
  9. Check the ‘Import duplicate records’ option and click next
    Check import duplication records
  10. Complete the import process.
  11. Go to the workplace and open the data import section. Once the data import job is done, open the the job records and see which records were updated. Notice that existing records were updated, no new records were created.
    Go back to the exported view
  12. Finally, refresh the view you started with to see the updated data for the existing records.
    Refresh the view to see the updated records

Although the product Help file still regards this feature as available, I consider this an unsupported feature. Use the above method at your own risk.

Note: A record will not be updated if it has been changed in Microsoft Dynamics CRM 4.0 after it was exported.

Thanks to Yaniv for detailing out these steps. You can view his blog link at
http://blogs.microsoft.co.il/blogs/rdt/archive/2009/05/12/how-to-use-the-data-enrichment-re-import-feature-in-microsoft-dynamics-crm-4-0.aspx

Monday, December 14, 2009

How to Increase the Tab limit in CRM Forms

just browsing the net and i found this beautiful post regarding tab limits in CRM forms , originally posted here

Hats off to the original contributor.

hope its useful for the readers.

By default the max number of tabs allowed in CRM Form is 8.

The max tab limit is defined in JavaScript of formeditor.aspx. This page can be found at the following location “\Microsoft Dynamics CRM\CRMWeb\Tools\FormEditor”.
You can change the count specified in the _iMaxTabs to increase the count as shown in the below screenshot.

 

2

Note: This is an unsupported change and it could be overwritten if you install Rollups for CRM.

Thursday, November 26, 2009

Managing the Solution Lifecycle for xRM Applications

The recording of session by Andrew Bybee delivered at PDC-09 is now available. A must watch video. take a look at it here :

http://microsoftpdc.com/Sessions/PR31?type=wmv

Developing xRM Solutions Using Windows Azure

The recording of session by Andrew Bybee delivered at PDC-09 is now available. A must watch video. take a look at it here :

http://microsoftpdc.com/Sessions/P09-07?type=wmv

Build a .NET Business Application in 60 Minutes with xRM and SharePoint

The recording of session by Barry Givens, Nikhil Hasija delivered at PDC-09 is now available. A must watch video. take a look at it here :

http://microsoftpdc.com/Sessions/PR33

Friday, November 20, 2009

Top Ten Reasons Why Your CRM Should Be Microsoft Dynamics CRM

 

1.   Turns Microsoft Office Outlook into the one place where you can manage both customer data and communications.

Microsoft Outlook messaging and collaboration client is already the world’s leading tool for customer communications.  Microsoft Dynamics CRM extends the reach of Microsoft Outlook by turning it into a tool to manage customer information. It puts lead information, marketing pitches, and sales call information into one central location for your sales and marketing staff.

2.   Works tightly with Microsoft Office Excel so businesses can make decisions on the fly.

Microsoft Excel spreadsheet software is a powerful tool for turning data into information that can be analyzed and shared. Microsoft Dynamics CRM features an always-on connection to Excel that enables you to quickly turn customer information into dynamic snapshots or PivotChart dynamic views. These views can help you understand in seconds how a sales increase or company expansion can benefit the business.

3.   Improves operational efficiency through the standardization and streamlining of processes.

The Microsoft Dynamics CRM adaptive workflow engine enables a business to automate business processes in ways that employees can use each day. Microsoft Dynamics CRM can relieve your staff of mundane but vital work. It can automate time-consuming repetitive tasks, warn staff of open customer issues, and automatically send important e-mail messages to customers and partners. So customer requests and orders don’t fall through the cracks.

4.   Works the way your business works with point-and-click system customization.

Microsoft Dynamics CRM can be tailored to work the way your business already works. Microsoft Dynamics CRM forms, relationship links, and customer views can be designed and modified without complicated programming.

5.   Gives the right information to the right people.

Certain employees need certain information. With Microsoft Dynamics CRM, system administrators have the tools to make sure the right information is delivered to the right people—whether they are using Outlook or the Web.

6.   Targets your marketing campaigns so you’re always in touch with the right customers.

Today, it’s more important than ever that customers know about special offers and new services a business offers.  Microsoft Dynamics CRM offers a marketing automation module that simplifies the following tasks: Building customer and lead lists, developing marketing campaigns targeted at specific customers, measuring the results of these campaigns, and developing follow-up marketing efforts.

7.   Simplifies service scheduling to keep customers satisfied.

One of the most challenging aspects of delivering great customer service is ensuring you never let customers down by missing a service call or appointment. Microsoft Dynamics CRM provides a centralized, all-in-one view of all customer service requests and service professional calendars. Dispatchers can quickly and easily match the right service personnel to a particular customer or type of service call.

8.   Integrates with your existing systems to help break down information silos.

Microsoft Dynamics CRM harnesses the power of Web services through the Microsoft .NET Framework. This latest generation of Microsoft technology enables businesses to connect isolated, legacy business systems and applications.

9.   Enhances offline communications so everyone can be productive regardless of location.

Microsoft Dynamics CRM is designed so your staff can be productive both in the office and on the road—even if they aren’t connected to a network. Information can be filtered so that people receive only the information they need such as meeting updates and sales figures.

10.  Builds on the power of SQL Server Reporting Services to create insightful business reports.

The SQL Server Reporting Services engine is a powerful analytical tool for business. The Microsoft Dynamics CRM embedded reporting engine integrates smoothly with Microsoft SQL Server to generate compelling data reports for business decision makers.

Microsoft Dynamics CRM 4.0 Training\Demo Videos

 

Microsoft Dynamics CRM 4.0 equips business professionals with access to customer information through a full suite of marketing, sales and service solutions within a familiar Microsoft® Office Outlook® interface to ensure rapid user adoption and fast results. These videos will introduce you to Microsoft CRM Online functions and capabilities.

Video: General Overview - Time: 15:00
This video will provide a navigation overview of Microsoft Dynamics CRM 4.0 via the Outlook client and Internet Explorer Web Browser.

Video: Sales Overview - Time: 12:00
This video will show the sales features in Microsoft Dynamics CRM 4.0 from creating a lead that leads to an opportunity that then leads to a quote.

Video: Marketing Overview - Time: 21:04
This video will show the marketing features of Microsoft Dynamics CRM 4.0, including Campaigns, Marketing Lists, Campaign Activities and Responses, and Reporting.

Video: Working with Accounts & Contacts - Time: 05:30
This video will show how to work with Accounts & Contacts within Microsoft Dynamics CRM 4.0

Video: Customer Service Overview - Time: 14:54
This video will provide an overview of the customer service functionality in Microsoft Dynamics CRM 4.0.

Video: Service Scheduling Overview - Time: 13:55
This video will provide an overview of the service scheduling functionality in Microsoft Dynamics CRM 4.0.

Video: Reporting Overview - Time: 15:29
This video will show the reporting capabilities in Microsoft Dynamics CRM

Video: Mail Merge - Time: 08:03
This video will show how to create mail merge templates and create emails and Word labels with mail merge.

Video: Using Advanced Find - Time: 10:02
This video will show you how to use the Advanced Find feature to find and take action on targeted sets of data. It will also show how to create Saved Views (My Views).

Thursday, November 19, 2009

check out the PDC 09 videos

check out the PDC 09 videos here

Tuesday, November 10, 2009

CRM 4.0 delete Organization

some time back I created an organization in our CRM server for a client but after some time we were told to remove the organization. I searched everywhere in the deployment manager but found no option to do the same. The only option I got there was to disable the organization. I scratched my head try almost all the links but of no use, so finally I disabled the organization. few days back i discussed the same with one of my friend Naren about the same he also did the full research in the deployment manager and YESSSSS he found the way. All we need to do is to first disable the organization and then we got the option to re enable it or delete it. the only thing now we need to remember is that this delete operation does not delete the org_MSCRM database , you have to delete the same manually.

Thanks Naren for the help.

I hope someone else too will get benefitted from this post. enjoy…

Thursday, September 10, 2009

CRM developer toolkit v1.0

A new toolkit to make customizations to CRM 4.0 has been released. Download bits from http://code.msdn.microsoft.com/E2DevTkt

View All CRM Entities - Displays a listing of CRM entities that are dynamically available from the CRM Explorer within Visual Studio 2008
Create and Update CRM Entities - Allows for creating new entities and updating existing entities from within the CRM Explorer experience
Create a Wrapper Class - Provides the ability to auto-generate wrapper classes for entities, which exposes the CRM entities and their corresponding attributes as classes and properties respectively to enable development of code to interact with the entities
Generate Plug-in Code - Enumerates the available Plug-ins for an entity and generates the code necessary to jumpstart the plug-in development process
Integrate the Build and Deploy Process - Simplifies the process of building and deploying a CRM solution
Deploy Across Multiple Servers - Assists in deployment and maintenance of Windows installer packages across multiple environments
The E2 team would also like to encourage Toolkit users to submit comments, suggestions, or other general thoughts about extending Toolkit functionality to better support the efforts of developers in planning, developing, customizing, and maintaining on-premise deployments of Microsoft Dynamics CRM. To initiate or participate in Toolkit discussions, In Code Gallery, please see visit the Toolkit Discussions tab at http://code.msdn.microsoft.com/E2DevTkt/Thread/List.aspx

Tuesday, August 25, 2009

Changing Ownership of Accounts changes ownership of others too

When we reassign a CRM Record then by default, Dynamics CRM reassigns all child records too. This behavior has consequences you might not want, such as reassigning paid invoices and other closed transaction records too, or think about a scene where two different sales reps are working on two different opportunities, associated with the same account then if the ownership of account changes the CRM reassigns the ownership of these two Opportunities too to the new owner, not only that the reassignment is done irrespective of the status of the related child record. i.e even the closed sales too goes in account of the new owner.

In short Selecting a different value for the “Owner” field (reassigning of the record) would reassign the account to the newly selected CRM user. Along with a lot of other records, which is the potential problem when historical sales reports are needed.

for quite some time i was thinking about the issue and the possible solution. Today I got a surprise visitor in my outlook (the RSS feed from dynamicscrmtrickbag). much to my surprise Richard Knudson explained the same issue and the solution in his blog.

The solution was quite simple :

Have a look at all of the 1:N relationships the Account entity has with other
Dynamics CRM entities , change the Type of Behavior of the required relationship
from default “Parental” relationship to “Configurable Cascading” and change the
assignment behaviour by changing the "Assign" value to the desired behaviour
(Cascade Active or Cascade None or Cascade User-Owned).

I would recommand the reading of full article here.

Great piece of artwork Richard. Cheers.

Wednesday, July 22, 2009

How to Troubleshoot the Outlook CRM Client

Hello all,

The Outlook Client for CRM is one of the most intriguing features in the Microsoft Dynamics CRM 4.0. Rather than having users ‘go somewhere else’ to use CRM, the Outlook CRM client provides in integration to Outlook — allowing end users easy access to CRM from where they do most of their day to day work.

Due to the sheer number of components the Outlook CRM client leverages, troubleshooting problems related to it could best be described as an adventure.

A great article is posted at the CRM Team Blog recently about how to troubleshoot and isolate common Outlook CRM Client issues. this could be of great help for those experiencing issues. Don’t forget to run that Diagnostic Tool first.

go through it here :

http://blogs.msdn.com/crm/archive/2009/05/29/troubleshooting-the-microsoft-dynamics-crm-client-for-outlook.aspx

Tuesday, July 21, 2009

Cannot Delete/Publish changes in a Custom/System Entity

Hi all,

for quite some time I was struggling with this issue :

Neither we were able to publish changes to a custom entity nor the system allowing us to delete it. while doing so we get the general popup error from that says "An error has occured." We were able to publish updates to all other entities. Also we could add or delete other custom entities.

Another thing that Custom entities have their own custom icons when you click on them and go into the Form or looking at an attribute. For these entities, there's just a red X. I didn't delete any files but still no icons were displayed while other custom entities that work display the icons just fine.


after enabling the trace we found this in trace log :

[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel(Int32 entityType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoader.LoadCellLabel(Guid cellObjectId, String cellObjectColumnName, Int32 objectType, String attributeName, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.InsertFormLabels(IBusinessEntity entity, ILabelLoader labelLoader, ExecutionContext context) at Microsoft.Crm.ObjectModel.OrganizationUIService.RetrieveMultipleWithAllLanguages(EntityExpression entityExpression, ExecutionContext context) at Microsoft.Crm.Metadata.OrganizationUIHelper.RetrieveInProductionHelper(Int32 objectTypeCode, ExecutionContext context) at Microsoft.Crm.Tools.ImportExportPublish.FormXmlHandler.ExportItem(XmlDocument importDocument) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc) at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport(String[] ExportEntities, String[] ExportRoles, String[] ExportWorkflows, ExportMask Mask) at Microsoft.Crm.Tools.ImportExportPublish.ExportXml.RunExport(String xmlArgs, XmlDocument& ExportDoc) at Microsoft.Crm.WebServices.ExportXmlService.ExportCompressed(String entities, String embeddedFileName, ExecutionContext context) [TargetInvocationException: Exception has been thrown by the target of an invocation.] at Microsoft.Crm.Application.Utility.Util.RaiseXMLError(Exception exception) at Microsoft.Crm.Dialogs.ExportCustomizationsPage.ConfigureForm() at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.cot_puritech__grid_cmds_dlg_exportcustomizations_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

After a long search i zeroed in to these posts:

http://social.microsoft.com/Forums/en-US/crm/thread/f6de6b65-29e7-4238-a042-c808ee65c026

and
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/da7aaa95-aa1b-42b7-a56e-f895354e99e8


In the first post the solution provided by André M Mestre
"This is normally caused by a missing attribute or a missing label:
[NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.ObjectModel.OrganizationUIService.LabelLoaderAllLanguages.LoadMetadataLabel

So to solve this you need to go directly to your database and check in the XML of the forms and views and the XML of the entity and then find out if all the attributes that you can see in there are still viewable in the CRM UI. If not you should correct the XML and then update the database.
The XML for the Form is in the OrganizationUIBase table and you can also check the XML for the views in the UserQueryBase and in the SavedQueryBase.

This is unsupported by Microsoft but is the only solution I know for this kind of issues.
Also please note that correcting the XML might be tricky sometimes."


with the help of the above mentioned solution I checked the Form XML in OrganizationUIBase table and figured out that there was an atribute in the Form XML that was actually deleted from the entity and after that i exported the entity from our staging server to the production server. I still dont know why the entity attribute was there in the form? and if the attribute was there in the form then why the system allowed me to delete the attribute ?

but anyways after recreating the attribute in the entity everything started working properly. it now allows me to publish the changes and even deleting the entity.

hope this will help someone else too.

Monday, June 15, 2009

Create Custom Workflow Activities for Microsoft Dynamics CRM 4.0

Sometimes there are situations when we need to add our own custom logic in workflow. The answer to it is custom workflow activity in Microsoft Dynamics CRM 4.0.

keeping that in mind I have decided to write a post for the same, but as usual before writing any new post I searched for the same on some of my favourite blogs and then I found a great article on the same on stunnware.

A must read post for all newbies. You can find it here.

happy coding :-)