CRM 2011 – Employee Self-Service CAL (ESS) (Reduce 90% of CAL cost!)

A new type of CAL has been introduced to the model to allow for licensing internal users that use other applications to connect to CRM without using the CRM web or outlook user interfaces. This employee self-service CAL (ESS CAL) is particularly useful for line-of-business (LOB) xRM applications and for intranet portals that are connected to CRM.
This license type is still a CAL, and that means that it is needed for every internal user. The good news is that it is approximately 10% of the cost of the full-use CAL.
In the past, if you were to build a helpdesk portal for internal users, you would have to license every user in your organization for CRM, even if they were not actually using CRM. For example, you may have a helpdesk staff of 10 users supporting a company of 500 users. Without the ESS CAL, you would need 510 CRM full use CALs. With the new ESS CAL, you would need 10 full use CALs and 500 ESS CALs, representing a savings of just under 90%.
There are some restrictions with the ESS CAL. First off, the obvious – the user can only access CRM through an application that uses the CRM SDK. They cannot access CRM using the CRM Outlook or Web UIs. There are also limitations on which SDK calls can be made. The ESS CAL can create, read, and update all entities in CRM but is restricted to not delete, assign, or share through the SDK. The good news is that it can change state, so the delete capability can be achieved by changing the state to InActive, which is probably best practice anyways, especially if you have turned on auditing and want your audit data to stick around…

Read more..

Advertisements
Categories: CRM

How to add a custom page to CRM 4.0 like the Settings page

August 12, 2010 4 comments

I wanted to add a custom developed aspx page to the CRM site like the Settings page in order to have some functionality that cannot appear in an iframe on an entity form (that’s a business point of view).

The Target:
CRM Settings

The Result:
Custom CRM Page

So here are the steps to implement the same page in the above image (considering you have visual studio installed on the CRM server):

  1. Create new Class Library project
  2. Reference these DLLs: Microsoft.Crm.Application.Components.Application.dll, Microsoft.Crm.Application.Components.UI.dll, Microsoft.Crm.SafeHtml.dll you can find these DLLs in the bin directory of your CRM site (ex. C:\inetpub\wwwroot\bin)
  3. Add reference to System.Web
  4. Add a new class with the following code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Crm.Application;
    using Microsoft.Crm;
    using System.Web.UI.WebControls;
    
    namespace iDemery.Crm.CustomPages
    {
        [QueryStringParameter("pid", ParameterType.Integer), QueryStringParameter("vid", ParameterType.Integer)]
        public abstract class AdminTestPage : AppNavPage
        {
            public AdminTestPage()
            {
    
            }
    
            protected override void ConfigurePage()
            {
                base.HomePage = "adminTest.aspx";
                base.Area = "custom administration";
                base.Nav = "nav_administration";
                base.ConfigurePage();
            }
    
            protected override void Render(System.Web.UI.HtmlTextWriter writer)
            {
                //base.Render(writer);
    
                Button button = new Button();
                button.Text = "helloooooooooooo";
                button.RenderControl(writer);
            }
        }
    }
                 
  5. To enable debugging, right click on your project’s name in the solution explorer window and open the properties page, change the output path from the build menu to the bin directory of your CRM site (ex. inetpub\wwwroot\bin\)
  6. Create a new page and name it adminTest.aspx with the following line
    <%@ Page language="c#" Inherits="iDemery.Crm.CustomPages.AdminTestPage" %>
            

    Put this page in the CRM Site, Tools, Admin directory (ex. C:\inetpub\wwwroot\Tools\Admin)

  7. Now the page is ready and we want it to appear on the left CRM menu, go to Settings, Customization, Export Customization and choose to export the Site Map customization
  8. In the exported customizations.xml file add the following area:
          <Area Id="CustomPages" ShowGroups="true" Icon="/_imgs/settings_24x24.gif">
          	<Titles>
            	<Title LCID="1033" Title="Custom Pages" />
            	<Title LCID="1025" Title="Other language" />
          	</Titles>
          	<Descriptions>
            	<Description LCID="1033" Description=" Custom Pages" />
            	<Description LCID="1025" Description="Other language" />
          	</Descriptions>
    	<Group Id="TestSettings">
            	<Titles>
              		<Title LCID="1033" Title="Test Page" />
              		<Title LCID="1025" Title="Other language" />
            	</Titles>
    		<SubArea Id="nav_administration" Title="Test 1" DescriptionResourceId="Administration_SubArea_Description" Icon="/_imgs/ico_18_administration.gif" Url="/tools/Admin/adminTest.aspx" AvailableOffline="false" />
    	</Group>
          </Area> 
                     
  9. Of course you can change the title, add titles from other languages, change the icon and save the customizations.xml file.
  10. Go to Settings, Customization, Import Customizations and import the customizations.xml file.
  11. Back to visual studio, build your project and you are done.
  12. To start debugging, go to Tools, Attach to process, and choose to attach to the w3wp.exe process
Categories: CRM Tags:

SharePoint Powershell Script Generator for SPSolution Deployment

June 26, 2010 19 comments

Here is an easy way to deploy .wsp files on your servers,

Script Generator UI

Steps:

  • Start the application (it will ask for administrator privileges).
  • Browse for the .wsp solution file.
  • Enter the solution identity (default to .wsp file name).
  • Enter the feature name.
  • Enter the web application url to activate the feature on (default to http://currentServerName:80/).
  • Decide whether to deploy the solution to all applications (default to all applications).
  • Hit the Generate Batch Files button!

This will open the folder that contains the .wsp file, and show you the generated .ps1 file that contains the Powershell commands, and the .bat file that shall run the .ps1 file, and automatically runs the batch file.

Generated Script Files

If you are into editing and deploying the same .wsp file many times, the procedure of deploying will just be 1 click of hitting the Generate Batch Files button.

Here is the application source code for whom of you guys interested,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace SharePointPowerShellScriptGenerator
{
    public partial class FormMain : Form
    {
        #region Constructor

        public FormMain()
        {
            InitializeComponent();

            openFileDialogSolutionWsp.AutoUpgradeEnabled = true;
            openFileDialogSolutionWsp.CheckFileExists = true;
            openFileDialogSolutionWsp.CheckPathExists = true;
            openFileDialogSolutionWsp.DefaultExt = ".wsp";
            openFileDialogSolutionWsp.Multiselect = false;
            openFileDialogSolutionWsp.RestoreDirectory = true;
            openFileDialogSolutionWsp.SupportMultiDottedExtensions = true;
            openFileDialogSolutionWsp.Filter = "SharePoint Solution Package (*.wsp)|*.wsp";
            openFileDialogSolutionWsp.FilterIndex = 0;
            openFileDialogSolutionWsp.FileName = "SharePoint_Solution_Package.wsp";

            WebApplicationUrl = string.Format("http://{0}:80/", Environment.MachineName);
            for (int i = 0; i < checkedListBoxActions.Items.Count; i++)
            {
                checkedListBoxActions.SetItemChecked(i, true);
            }
        }

        #endregion

        #region Properties

        public string SolutionIdentity { get { return textBoxIdentity.Text.Trim(); } set { textBoxIdentity.Text = value; } }
        public string SolutionPath { get { return textBoxSolutionPath.Text.Trim(); } set { textBoxSolutionPath.Text = value; } }
        public string WebApplicationUrl { get { return textBoxWebApplicationUrl.Text.Trim(); } set { textBoxWebApplicationUrl.Text = value; } }
        public string FeatureName { get { return textBoxFeatureName.Text.Trim(); } set { textBoxFeatureName.Text = value; } }
        public string DirectoryPath { get; set; }

        #endregion

        #region Methods

        private void GeneratePowershellScript(string generatedFileName)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(string.Format("Add-PsSnapin Microsoft.SharePoint.PowerShell"));
            sb.AppendLine();
            sb.AppendLine(string.Format(@"$SiteUrl=""{0}""", WebApplicationUrl));
            sb.AppendLine(string.Format(@"$SolutionName=""{0}""", SolutionIdentity));
            sb.AppendLine(string.Format(@"$SolutionPath=""{0}""", SolutionPath));
            sb.AppendLine(string.Format(@"$FeatureName=""{0}""", FeatureName));
            sb.AppendLine();
            sb.AppendLine("$FeatureID= $(Get-SPFeature -limit all | ? {($_.displayname -eq $FeatureName)}).Id");
            sb.AppendLine(string.Format("$SingleSiteCollection = Get-SPSite $SiteUrl"));
            sb.AppendLine();
            sb.AppendLine();

            // STARTING SHAREPOINT ADMINISTRATING SERVICE
            sb.AppendLine(@"$AdminServiceName = ""SPAdminV4""");
            sb.AppendLine("$IsAdminServiceWasRunning = $true;");
            sb.AppendLine();
            sb.AppendLine();
            sb.AppendLine(@"if ($(Get-Service $AdminServiceName).Status -eq ""Stopped"")");
            sb.AppendLine("{");
            sb.AppendLine("    $IsAdminServiceWasRunning = $false;");
            sb.AppendLine("    Start-Service $AdminServiceName");
            sb.AppendLine(@"   Write-Host 'SERVICE WAS STOPPED, SO IT IS NOW STARTED'");
            sb.AppendLine("}");
            sb.AppendLine();

            // DISABLE FEATURE
            if (checkedListBoxActions.GetItemChecked(0))
            {
                sb.AppendLine(@"Write-Host 'DEACTIVATING FEATURE ...'");
                sb.AppendLine();
                sb.AppendLine("Disable-SPFeature $FeatureName -Url $SiteUrl -Confirm:$false");
                sb.AppendLine(@"Write-Host 'FEATURE HAS BEEN DEACTIVATED SUCCESSFULLY.'");
                sb.AppendLine();
            }

            // UNINSTALL SOLUTION
            if (checkedListBoxActions.GetItemChecked(1))
            {
                sb.AppendLine(@"Write-Host 'UNINSTALLING SOLUTION ...'");
                sb.AppendLine();
                sb.AppendLine("$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $true)}");
                sb.AppendLine();
                sb.AppendLine("if ($Solution -ne $null)");
                sb.AppendLine("{");
                sb.AppendLine("    if($Solution.ContainsWebApplicationResource)");
                sb.AppendLine("    {");
                sb.AppendLine("        Uninstall-SPSolution $SolutionName -AllWebApplications -Confirm:$false");
                sb.AppendLine("    }");
                sb.AppendLine("    else");
                sb.AppendLine("    {");
                sb.AppendLine("        Uninstall-SPSolution $SolutionName -Confirm:$false");
                sb.AppendLine("    }");
                sb.AppendLine("}");
                sb.AppendLine();
                sb.AppendLine("while ($Solution.JobExists)");
                sb.AppendLine("{");
                sb.AppendLine("    Start-Sleep 2");
                sb.AppendLine("}");
                sb.AppendLine();
                sb.AppendLine(@"Write-Host 'SOLUTION HAS BEEN UNINSTALLED SUCCESSFULLY.'");
                sb.AppendLine();
            }

            // REMOVE SOLUTION
            if (checkedListBoxActions.GetItemChecked(2))
            {
                sb.AppendLine(@"Write-Host 'REMOVING SOLUTION ...'");
                sb.AppendLine();
                sb.AppendLine("if ($(Get-SPSolution | ? {$_.Name -eq $SolutionName}).Deployed -eq $false)");
                sb.AppendLine("{");
                sb.AppendLine("    Remove-SPSolution $SolutionName -Confirm:$false");
                sb.AppendLine();
                sb.AppendLine(@"Write-Host 'SOLUTION HAS BEEN REMOVED SUCCESSFULLY.'");
                sb.AppendLine("}");
                sb.AppendLine();
            }

            // ADD SOLUTION
            if (checkedListBoxActions.GetItemChecked(3))
            {
                sb.AppendLine(@"Write-Host 'ADDING SOLUTION ...'");
                sb.AppendLine();
                sb.AppendLine("Add-SPSolution $SolutionPath  | Out-Null");
                sb.AppendLine();
                sb.AppendLine(@"Write-Host 'SOLUTION HAS BEEN ADDED SUCCESSFULLY.'");
                sb.AppendLine();
            }

            // INSTALL SOLUTION
            if (checkedListBoxActions.GetItemChecked(4))
            {
                sb.AppendLine(@"Write-Host 'DEPLOYING SOLUTION ...'");
                sb.AppendLine();
                sb.AppendLine("$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $false)}");
                sb.AppendLine();
                sb.AppendLine("if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource))");
                sb.AppendLine("{");

                if (checkBoxDeployToAll.Checked)
                {
                    sb.AppendLine("Install-SPSolution $SolutionName –AllwebApplications -GACDeployment -Confirm:$false");
                }
                else
                {
                    sb.AppendLine("Install-SPSolution $SolutionName -WebApplication $SiteUrl -GACDeployment -Confirm:$false");
                }
                
                sb.AppendLine("}");
                sb.AppendLine("else");
                sb.AppendLine("{");
                sb.AppendLine("Install-SPSolution $SolutionName -GACDeployment -Confirm:$false");
                sb.AppendLine("}");
                sb.AppendLine();
                sb.AppendLine("while ($Solution.Deployed -eq $false)");
                sb.AppendLine("{");
                sb.AppendLine("    Start-Sleep 2");
                sb.AppendLine("}");
                sb.AppendLine();
                sb.AppendLine(@"Write-Host 'SOLUTION HAS BEEN DEPLOYED SUCCESSFULLY.'");
                sb.AppendLine();
            }

            // ENABLE FEATURE
            if (checkedListBoxActions.GetItemChecked(5))
            {
                sb.AppendLine(@"Write-Host 'ACTIVATING FEATURE ...'");
                sb.AppendLine();
                sb.AppendLine("if ($FeatureName -ne $null)");
                sb.AppendLine("{");
                sb.AppendLine("    Enable-SPFeature $FeatureName -Url $SiteUrl");
                sb.AppendLine("}");
                sb.AppendLine();
                sb.AppendLine(@"Write-Host 'FEATURE HAS BEEN ACTIVATED SUCCESSFULLY.'");
                sb.AppendLine();
            }

            // SHAREPOINT ADMINISTRATING SERVICE
            sb.AppendLine();
            sb.AppendLine("if (-not $IsAdminServiceWasRunning)");
            sb.AppendLine("{");
            sb.AppendLine("    Stop-Service $AdminServiceName");
            sb.AppendLine("}");
            sb.AppendLine();
            sb.AppendLine();

            sb.AppendLine("Remove-PsSnapin Microsoft.SharePoint.PowerShell");
            sb.AppendLine();
            sb.AppendLine("Echo Finish");

            File.WriteAllText(generatedFileName, sb.ToString(), Encoding.UTF8);
        }

        private void GenerateBatchFile(string powershellFileName, string generatedBatchFileName)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("@echo off");
            sb.AppendLine(string.Format("Set DeploymentPackageFolder={0}", DirectoryPath));
            sb.AppendLine("cd %DeploymentPackageFolder%");
            sb.AppendLine(string.Format(@"PowerShell -file .\{0}", powershellFileName));
            sb.AppendLine("pause");
            
            File.WriteAllText(generatedBatchFileName, sb.ToString());
        }

        #endregion

        #region UI Events

        private void checkedListBoxActions_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (checkedListBoxActions.SelectedIndex != 0) return;

            bool selected = checkedListBoxActions.GetItemChecked(checkedListBoxActions.SelectedIndex);

            checkedListBoxActions.SetItemChecked(1, selected);
            checkedListBoxActions.SetItemChecked(2, selected);
        }

        private void buttonSolutionBrowse_Click(object sender, EventArgs e)
        {
            if (openFileDialogSolutionWsp.ShowDialog() != DialogResult.OK) return;

            SolutionPath = openFileDialogSolutionWsp.FileName;
            SolutionIdentity = openFileDialogSolutionWsp.SafeFileName;

            DirectoryPath = openFileDialogSolutionWsp.FileName.Remove(openFileDialogSolutionWsp.FileName.IndexOf(openFileDialogSolutionWsp.SafeFileName));
        }

        private void buttonGenerateScript_Click(object sender, EventArgs e)
        {
            try
            {
                GeneratePowershellScript(DirectoryPath + "script.txt");
                System.Diagnostics.Process.Start(DirectoryPath + "script.txt");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, this.Text);
            }
        }

        private void buttonGenerateBatch_Click(object sender, EventArgs e)
        {
            try
            {
                string powershellFileName = "PowershellDeploy.ps1";
                string batchFileName = "InstallerBatch.bat";
                GeneratePowershellScript(DirectoryPath + powershellFileName);
                GenerateBatchFile(powershellFileName, DirectoryPath + batchFileName);

                System.Diagnostics.Process.Start(DirectoryPath);
                System.Diagnostics.Process.Start(DirectoryPath + batchFileName);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, this.Text);
            }
        }

        #endregion
    }
}
Categories: Uncategorized

SharePoint 2010 Alternate Access Mappings Cannot login error

June 26, 2010 3 comments

I was configuring SharePoint 2010 on a customer’s production server using the alternate access mapping to map the customer’s domain to the SharePoint web application and I was able to log on to the SharePoint web application from my office and surprised that I cannot log on to the same application from inside the customer’s company (notice that the customer’s domain name is the same domain controller name), after googling the problem I found that it was a IIS7 related to Windows Server 2008 R2 issue.

Here is the steps to solve that,

  • Start Registry Editor (Regedt32.exe).
  • Locate and click the following key in the registry:
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
  • On the Edit menu, click Add Value, and then add the following registry value:
    • Value name: DisableStrictNameChecking
    • Data type: REG_DWORD
    • Radix: Decimal
    • Value: 1
  • In Registry Editor, locate and then click the following registry key:
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa o Right-click Lsa, point
      to New, and then click DWORD Value.
    • Type DisableLoopbackCheck, and then press ENTER. o Right-click DisableLoopbackCheck,
      and then click Modify.
    • o In the Value data box, type 1, and then click OK
  • Restart the server
Categories: Uncategorized

Start remote desktop from your BlackBerry

Here I got remote desktop to my office PC from my blackberry bold, you can try it for 7 days by pointing your bb browser to bb.rdmplus.com and for more info see http://www.rdmplus.com/rdm/bb/download.html

Categories: Uncategorized

I like ScribeFire

Again, my first post from ScribeFire, it simply integrates with firefox, so you can select whatever text you like while browsing the internet and click blog this page!

Categories: Uncategorized

My first post from blackberry

This is my first hello world post from my lovely blackberry bold!
You can get wordpress on your blackberry by pointing to http://blackberry.wordpress.com/install

Categories: Common