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

August 21, 2012

How To Hide Ribbon From Users Without Edit Page Privilege

How To Hide Ribbon FromUsers Without Edit Page Privilege

Open your SharePoint master page

Locate this line:


<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">

Change it to

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">

Now find the end of the “s4-ribbonrow” tag and add following block right after it:

<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">
<
script type="text/javascript">
document.getElementById("s4-ribbonrow").style.display = "block";
</script>
</
Sharepoint:SPSecurityTrimmedControl>

Save the new master page and publish it



How to Hide “My Site” and “My Profile” from the user menu




Go To >> Central Administration



Go To >> Manage Service Application


Go To >> User Profile Service Application




Select From the ribbon >> Manage




Select >> Manage User Permission






Choose a group then uncheck the two check boxes >> “Use Personal Features” and “Create Personal Features”

NB: the SPfarm account will not be affected




Click >> Ok




Check your menu            ( Make sure to ctrl+f5 )

NB: This may take several minutes depending on the environment (If you can’t see the new rules being reflected in the site. You can restart “User Profile Service”)



Displaying a custom property My Settings

Displaying a custom property My Settings

During the creation of the custom property these are to be considered

o    'Default User Profile Subtype', 'Show in the profile properties section of the user's profile page'
o    'Show on the Edit Details page' are checked.
o    The Policy Setting is Optional,
o    the default privacy setting is everyone (and greyed out),
o    User can override is not checked (and greyed out),
o    Replicable is checked.
o    Allow users to edit values for this property is checked.
o    Index is checked

In Central Administration

o    Run the 'User Profile to SharePoint Quick Synchronization'
o    'User Profile to SharePoint Full Synchronization' timer jobs.




Thank You