March 14, 2013

Best practices in MS-CRM Installation: Service Accounts

MSCRM Service Accounts:

I am installing MS-CRM on a server running windows server 2008 R2, and another server hosting the SQL2012 running on windows server 2012 

during the installation of CRM2011, this screen will appear 


Now I will show how to succeed in adding valid accounts : 
NA: you dont have to stick to the naming below, but Always  give clear names
  1. CRM Application Service Account
    • Name: CRMAppSvcAcc
    • Add to Performance Log Users group
    • Add to  local Administrators group
  2. CRM Deployment Web Service Account
    • Name: CRMDeploySvcAcc
    • Add to Performance Log Users group
    • Add to  local Administrators group
  3. CRM Sandbox Processing Service Account
    • Name: CRMSandboxSvcAcc
    • Add to Performance Log Users group
  4. CRM Asynchronous Processing Service Account
    • Name: CRMAsyncSvcAcc
    • Add to Performance Log Users group

If you are using a Server for MS-CRM and a Server for MS-SQL then make sure to add the users to groups on both servers, else you will see this error



Good Luck :)
I am ready for any questions

March 13, 2013

Create a Custom Action on a SharePoint List\Library


Custom Action:

This custom action is used to start a specific deletion workflow 

1-      Open main site in SharePoint designer



2-      Go to lists and libraries










3-      Choose the preferred library






4-      Click New Custom action as List Item Menu






5-      Add the action name




6-      Choose “Initiate Workflow”




7-      Choose the preferred workflow ex: “Delete an item”




8-      Click Ok

March 11, 2013

SharePoint PowerShell Useful Commands


SharePoint Power-Shell Useful Commands

Adding a solution :

  • stsadm –o addsolution –name SharePointProject2.wsp

or Using SharePoint Management Shell :

  • Add-SPSolution c:\code\SharePointProject2\bin\debug\SharePointProject2.wsp



Deploy a solution :

  • stsadm –o deploysolution –name SharePointProject2.wsp –url http://moss-server –allowCasPolicies –immediate

or Using SharePoint Management Shell :

  • Install-SPSolution –Identity SharePointProject2.wsp –WebApplication http://sp2010 -GACDeployment

March 08, 2013

Getting User Profile information in a mixed authenticated web application (Claims Based)


If you ever needed to get user information, in a claims based authenticated web application (mixed authentication), by using the web service method: GetUserProfileByName in InfoPath, (actually, it’s the only method you can use, because all the other possible ways, and even the managed code behind in InfoPath, they all work in the client mode, but never on the browser!!!!!! since querying user profiles directly, in a mixed authenticated web app isn’t possible!! it always give you the “unauthorized” error logged whenever u try to run in from the browser!)
So, here’s what you gotta do:

1.       You have to have a web application with Classic mode authentication only in your farm, suppose this is its url: http://sp:4444/  
2.       Create a new Data Connection Library in the site that hosts your InfoPath form (it’s a type of SharePoint library that stores connection files, with a .udcx extension: these files are usually used for cross-domain data connections.)
3.       In your InfoPath form, Add a “Receiving Data” connection – From a SOAP service – point it to the url of the user profiles service, in the Classic authenticated web application (e.g.: http://sp:4444/_vti_bin/UserProfileService.asmx), name it: GetUserProfileByName.
4.       In the same Data Connections wizard, select the data connection:  GetUserProfileByName, and click on : “Convert to connection file”, and type-in the url of your data connection library, and give a name for your data connection file (e.g.: http://sp:2012/DataConnectionLibrary/GetUserProfileByName.udcx)
5.       Go to the DataConnectionLibrary to make sure the new connection file has been added, download a copy of It, and edit it to add/update the following tag:
<udc:Authentication>
                <udc:UseExplicit CredentialType="NTLM">
                <udc:UserId>domain\adminUserName</udc:UserId>
                <udc:Password>password</udc:Password>
                </udc:UseExplicit>
</udc:Authentication>
6.       Add the updated .udcx file back to the data connections library, then click on the arrow next to the item’s Name to Approve it.

Now your data connection to the User Profiles service is ready to be used in the form, both on the client form and the browser form!

NB: This experience was taken from my colleague Malek El Zeeni