Wednesday, October 26, 2011

Microsoft Outlook is not set as the default mail client?


While installing CRM Outlook, it gives a strange error:"Microsoft Outlook is not set as the default mail client. Please set Microsoft Outlook as the default mail client from Control Panel\Internet Options\Programs, and then re-run the check."

I'm sure the Outlook is my default mail client, just in case I reset it again. but the error still exist! I'm aware of CRM always query Registry to get information in such cases, so open the default application key: HKLM\SOFTWARE\Clients\Mail, the Default value is Windows Live Mail, so change it to Microsoft Outlook, the error gone!



Thursday, July 28, 2011

5 syntax changes in Dynamics CRM 2011 plugins

There are number of changes between Dynamics CRM 2011 SDK and CRM 4 SDK. Let’s take a look at what has changed between plugins.
1. The IPlugin now resides in Microsoft.Xrm.Sdk namespace instead of Microsoft.Crm.Sdk
public class ClassName : Microsoft.Crm.Sdk.IPluginpublic class ClassName : Microsoft.Xrm.Sdk.IPlugin



2. The Execute method signature of the IPlugin interface has changed, it now expects an IServiceProvider instead of the IPluginExecutionContext.
public void Execute(IPluginExecutionContext context)
public void Execute(IServiceProvider serviceProvider)


3. To get a reference to the IPluginExecutionContext you now need to call the GetService method of the IServiceProvider interface.
public void Execute(IPluginExecutionContext context)
Microsoft.Xrm.Sdk.IPluginExecutionContext context =(Microsoft.Xrm.Sdk.IPluginExecutionContext)
    serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext));


4. ICrmService has been changed to IOrganizationService.
ICrmService sdk = context.CreateCrmService(true);
IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService sdk = factory.CreateOrganizationService(context.UserId);


5. DynamicEntity has been changed to Entity.    ·         Properties property of DynamicEntity no longer exists    ·         Getting and Setting values no longer use *Property classes,
      eg: no more KeyProperty, StringProperty…etc, simply do int value = (int)entity[“schema_name”];
if (context.InputParameters.Properties.Contains("Target") &&
    context.InputParameters.Properties["Target"is DynamicEntity)
if (context.InputParameters.Contains("Target") &&
    context.InputParameters["Target"is Entity)

 

List of changes : Type mapping between CRM 4.0 and CRM 2011

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, the programming model has been changed to use native .NET types whenever possible. A beautiful post from Resultondemand explains it all, with all credit to their great job the excerpts of the post is :
Type Mapping Between Versions
The following table shows the mapping between the defined type for an entity attribute, the type that is used in a record, and the type that was used in Microsoft DynamicsCRM4.0.
Attribute Type Microsoft Dynamics CRM 2011 Type Microsoft DynamicsCRM4.0 Type
AttributeTypeCode.Booleanbool or System.BooleanCrmBoolean
AttributeType.CalendarRulesEntityCollectionDynamicEntity[] or calendarrule[]
AttributeType.CustomerEntityReferenceCustomer
AttributeType.DateTimeSystem.DateTimeCrmDateTime
AttributeType.Decimaldecimal or System.DecimalCrmDecimal
AttributeType.Doubledouble or System.DoubleCrmFloat
AttributeType.Integerint or System.IntegerCrmNumber
AttributeType.
Internal
System.Object
Not used in records.
Not used in records.
AttributeType.LookupEntityReferenceLookup
AttributeType.Memostring or System.StringSystem.String
AttributeType.MoneyMoneyCrmMoney
AttributeType.OwnerEntityReferenceOwner
AttributeType.PartyListEntityCollection or ActivityParty[]activityparty[] or DynamicEntity []
AttributeType.PicklistOptionSetValuePicklist
AttributeType.PrimaryKeySystem.GuidKey
AttributeType.StringSystem.StringSystem.String
AttributeType.StateOptionSetValue or enumeration generated for the entity stateEntityNameStateInfo
AttributeType.StatusOptionSetValue orintStatus
AttributeType.UniqueidentifierSystem.GuidUniqueIdentifier
AttributeType.VirtualSystem.Object
Not used in records.
Not used in records.
Other Type Changes
Old Type New Type
CrmAttributeType Class (MetadataService)Microsoft.Xrm.Sdk.Metadata.AttributeTypeCode
Moniker Class (CrmService)Microsoft.Xrm.Sdk.EntityReference
SecurityPrincipal Class (CrmService)Microsoft.Xrm.Sdk.EntityReference
Happy Coding Smile

Sunday, July 17, 2011

Using CRM 2011 Service to Create Record from Code C# - IOrganizationService

// sample to test the method   
private void CreateAccount(string AccountName)
    {
        IOrganizationService _service = GetCRMService("http://<ServerName>:<PortNumber>", "<UserName>", "<Password>", "<Domain>");
        try
        {
            Entity account = new Entity("account");
            account["name"] = AccountName;
            _service.Create(account);
        }
        catch (Exception ex)
        {
            throw;
        }
    }

// GetCRMService   
    public static IOrganizationService GetCRMService(string ServerURL, string UserName, string Password, string DomainName)
    {
        ClientCredentials credentials = new ClientCredentials();
        credentials.Windows.ClientCredential = new System.Net.NetworkCredential(UserName, Password, DomainName);
        Uri organizationUri = new Uri(ServerURL + "/<OrgName>/XRMServices/2011/Organization.svc");
        Uri homeRealmUri = null;
        OrganizationServiceProxy orgService = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, null);
        IOrganizationService _service = (IOrganizationService)orgService;
        return _service;
    }

Wednesday, June 29, 2011

SharePoint 2010: Add button to Ribbon with SharePoint designer

Sometimes you may need to add buttons to SharePoint 2010 ribbon. You can take one of two approaches: You can write code to add the button. Another approach is to use SharePoint Designer to add button to Ribbon. Today I’ll show you how to add button to Ribbon using SharePoint Designer. However, when you’ll use SharePoint Designer to add button to Ribbon and if you do  so in Development or Staging server, then think about how to do the same in Production server.

Add Button to List/Library forms (AllItems.aspx, DispForm.aspx, EditForm.aspx, NewForm.aspx)

Let’s say you have a list and you want to add a new Ribbon button in the AllItems.aspx page.
1. First open the site in SharePoint Designer.
2. Then click “List and Libraries” link from the left-hand menu and then click the target list from the details page on the right hand side as shown below:
image
Figure 1: Select List/Libraries in SharePoint Designer

3. Once you click the list name you’ll be landed to the list/library settings page. In this page you can edit four forms (AllItems.aspx, DispForm.aspx, EditForm.aspx and NewForm.aspx) and you can add button to the page’s ribbon. The page is shown below:
image
Figure 2: Four built-in Forms

4. From the ‘List Settings’ tab on the top, select ‘Custom Action’ as shown below:
image
Figure 3: Add custom Action

5. Say you want to add button to ‘NewFom.aspx’. For this click ‘New Form Ribbon’ from the Custom Action. You’ll get the ‘Create Custom Action’ window where you can add custom action to the Ribbon. From the window below you can chose one of three different actions: Navigate to form, Initiate workflow, Navigate to Url. If you need more custom action then SharePoint Designer will not be helpful. You need to write code to extend Ribbon button actions.
image
Figure 4: Custom Action Properties



Find Ribbon Location:

In the List/Library form, the button are placed in groups. As shown in the image below, the new form has three sections:
image
Figure 5: Buttons are placed in Groups/Sections in form
Now you may want to place your button in a particular group and for that you need know the location id so that you can put the id in the ‘Ribbon Location’ in the custom action properties in SharePoint Designer. Using Firebug extension of Mozilla Firefox, I have found the ribbon location id as shown below:
image
Figure 6: Ribbon group/section id (detected using Firebug extension of Firefox)
So now you can put the ribbon location id in the custom action properties. For example to put the ‘Show Me’ button in the ‘Commit’ section I have put the ribbon button location to ‘Ribbon.ListForm.Edit.Commit.Controls._children’. Here the ‘.Controls._children’ is added to the ribbon id. The following figure show two windows side by side:
image
Figure 7: Custom Action windows (On Left) and New Item Form (On right) with ‘Show Me’ button


Decide when to show the Ribbon Button

Sometimes you don’t want to show the button for all users. Rather you want to show for users having a set of permissions. The ‘Rights mask’ option allow us to meet this requirements. The available values can be found on MSDN. You can put more than one values in the Rights Mask text box separated by semicolons as shown below:
image
Figure 8: Rights mask


Source: http://ranaictiu-technicalblog.blogspot.com/2010/06/sharepoint-2010-add-button-to-ribbon.html

Monday, June 20, 2011

Including CRM Sales Order in Mail Merge

Step 1: Export Sales Order Entity customization from CRM Environment

Step 2: Open Customization file and then Update (or Add) IsMailMergeEnabled as 1, Save the changes.

Step 3: Import the changed file in to CRM and publish the changes.

If above method does not work then try following unsupported method, connect database and run following query, change entity name as per your requirement..

Monday, May 30, 2011

SharePoint 2010: Specified value is not supported for the parameter

Make sure AD is accessible. If you are not connected to domain directly, make sure you have VPN connected.

Wednesday, April 27, 2011

New tool: CrmDiagTool 2011

Two months ago, Philippe Brissaud from Microsoft Canada asked me to help him migrate the well known CrmDiagTool 4 to Microsoft Dynamics CRM 2011. I guess you know what I answered him: of course I help!
Today, Philippe and I are proud to release this new version of CrmDiagTool.
We focused on Server diagnostics and removed features related to reporting services and email router.
The features are the following:
  • Enable/Disable tracing
  • Zip content of Trace directory
  • Open Trace directory
  • Generate diagnostic file in text or html format with components selection
  • Enable/Disable DevErrors
Some screenshots:

Two months ago, Philippe Brissaud from Microsoft Canada asked me to help him migrate the well known CrmDiagTool 4 to Microsoft Dynamics CRM 2011. I guess you know what I answered him: of course I help!
Today, Philippe and I are proud to release this new version of CrmDiagTool.
We focused on Server diagnostics and removed features related to reporting services and email router.
The features are the following:
  • Enable/Disable tracing
  • Zip content of Trace directory
  • Open Trace directory
  • Generate diagnostic file in text or html format with components selection
  • Enable/Disable DevErrors
Some screenshots:

Regarding source code: As the previous version had not its source code released, this version does not too.

Download link:
http://cid-57142f3d072ab525.office.live.com/self.aspx/CRM%202011%20Tools/CrmDiagTool2011.zip

Source: http://mscrmtools.blogspot.com/2011/04/new-tool-crmdiagtool-2011.html

Tuesday, April 26, 2011

Change SQL Server 2008 Collation after installation

MS CRM – Skype Connector

Skype Addon for Microsoft Dynamics CRM allows to dial CRM Contacts, Lead and so on via Skype. It’s developed in ASP.NET and C#.

http://mscrmskypeaddon.codeplex.com/

Rollup Update 16 for CRM 4.0

Hello Guys,

Microsoft released rollup update 16 for CRM 4.0 after CRM 2011 Launch :), it fixes alot of issues we used to face 

http://support.microsoft.com/default.aspx?kbid=2477743 


http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5ad652f9-d81d-4f12-b9ca-883816806634

Thanks,

What features do I absolutely need in SharePoint Scanning?

I keep getting this question emailed over and over, and thought I would throw a post up about what I see as absolutely necessary for a SharePoint Scanning and Capture application:
  1. The solution needs to be hardware agnostic.   There are quite a few applications out there that are tied to a single hardware platform.  Kodak is one that comes to mind.  Your capture application needs to support TWAIN, ISIS and VRS drivers for all different manufacturers.  Out of the box, it also needs to support image file import for PDF, TIFF, JPG, etc.  You want to be able to choose your own scanning hardware.
  2. Franken-capture is a bad thing.  Find one capture application that provides all the necessary pieces for your organization.   Don’t pile together 5 different apps to support all your needs, your support nightmare will become a reality.
  3. Advanced Data Extraction (ADE) is absolutely necessary.  ADE is the ability to automatically extract information from a document, regardless of where it lies on the page.  This is key to automation and efficiency.  Many manufacturers in the SharePoint space partner with others to make this happen…go with someone who has it built in to the product.
  4. Require support for multiple back-end repositories.  Don’t go with a pure SharePoint solution.  90% of the organizations I deal with need to send documents and metadata to something other than SharePoint.  Make sure this is out of the box functionality, and don’t settle for “we can build that”.
  5. Routing sheets are the hot new thing.   Make sure that the solution supports 2D barcodes and Optical Mark Recognition (OMR).  These technologies are highly used in distributed capture for SharePoint and are absolutely necessary for any implementation.
  6. Document Harvesting will save you time and effort.  Find a solution that can ingest folder directories and use folder names/file names as metadata.
  7. Dynamic Library, folder names and file naming in SharePoint is required.  Many solutions will create random naming schemes for folders and file names.  People still love their folders, and standardized naming is absolutely required.
Just a short list of features I find customers require in their organizations.

http://scanningwithsharepoint.wordpress.com/2010/11/22/what-features-do-i-absolutely-need-in-sharepoint-scanning/ 

Sunday, January 2, 2011

عن حادثة الاسكندرية أحدثكم

السلام عليكم و رحمة الله 

أحزنني كثيرا ما حدث في كنيسة القديسين (مثنى قديس) في الاسكندرية - مصر و ما خلف من ضحايا مسلمين و اقباط و اتقدم لهم بخالص الاسى و التعازي.
و لكن ما أحزنني اكثر هو انقياد البعض خلف القلة المندسة التي تريد اشعال الفتن و اغفال الناس عن العدو الحقيقي.

لاوضح وجهة نظري اريد ان اسال
1- ان ما حدث شنيع بمعنى الكلمة و لا يقبله عقل و لا دين و لكن لماذا هذه الحملة التي الشرسة التي تؤكد على وحدة الوطن ووجود ايدي خفية تريد زعزعة امنه و استقراره ؟
لنوافقكم الرأي بان هناك ايدي خفية ... هل كانت هذه الايدي هي من اغرقت عبارة السلام و على متنها اكثر من الف مصري مسلم و قبطي 
و لنتذكر الصور سويا 


و لنتذكر ايضا اكبر كارثة في عهد مبارك 
و هي قطار الصعيد الذي راح ضحيته اكثر من ثلاثة الاف مصري اقول ايضا مسلم و قبطي 
و هاهي الصور 










و ياتي النظام اليوم ليخرج لنا بالاغاني و الاناشيد و اغضب و لا تخطئ ... لماذا؟
الأن هذا الحدث يكشف ان النظام ضعيف غير قادر على حماية الاقلية القبطية و بالتالي تتسلط الانظار عليه و ربما تطالب برقابة الانتخابات لضعفه 
ام لتبرئة صورته العالمية و العالمية فقط امام الخارج لانه طالما كان لا يابه بصورته الداخلية في اذهاننا جميعا
لقد اعتاد النظام الاستخفاف بعقولنا في اكثر من حادثة و من موضع و انسابها لمجنون او مختل عقلي او يترك الجاني حرا طليقا ممدا يده له بالمساعدة على الهرب 
ان المتهم الاول و الاخير في هذه الحادثة هو النظام الحالي عامة ووزارة الداخلية خاصة ان لم يكن بالتخطيط و التنفيذ لاغفال الناس عما حدث في الانتخابات - طبقا لنظرية المؤامرة - فبالاهمال و التكاسل 
لقد اصبحت الدولة بجميع اجهزتها تحرس مبارك و تحولت وزارة الداخلية من حماية المواطن و حقوقه لقمع اي محاولة لزعزعة امن و استقرار الحاكم .
هل اصبح بالامكان الدخول بسيارة مفخخة في مكان مثل هذا. هل أصبح امننا ضعيفا لهذا الحد 
هل كان انشغال وزارة الداخلية بتامين مباراة الاهلي و الزمالك اهم من تامينها ضد التفجير و التفخيخ.
أسد علي وفي الحروب نعامة *** ربداء تجفل من صفير الصافر
هكذا اصبح حال وزارة الداخلية تستأسد على المواطنين و تعجز عن مهامها الحقيقة 
ان العدو الحقيقي هو من اوصلنا لهذا الحال من بؤس و شقاء و معدلات فقر و امراض و خصخة و خلافه 
و اكثر من ذلك هو الاستخفاف الدائم بالشعب و كانه قطيع غنم يورث ليأتوا امام الناس جميعا بعد تداول الفضائيات و القنوات الاخبارية و الجميع تزوير الانتخابات و يؤكدوا على نزاهتها و ثقة الشعب في حكومة فشلت لاكثر من 28 عاما في توفير حياة كريمة للمواطن او احترام آدميته و عقله و حقوقه
لست ضد الحزن و الغضب من اجل ما حدث بل قد أكون أكثركم غضبا و لكن ما اريد أن نرى العدو الحقيقي و ان نرى الامور على حقيقتها

أتمنى ان تصلكم وجهة نظري 
شكرا.