MS CRM 2011: Customer Portal Contact Sign Up

Building off my previous post where I converted the authentication to what was used with the eService portal available for 4.0 http://wp.me/p1iFyd-52.  I am now making the customer sign up a little less cumbersome and more like the original.

First what we need to do is go back into our customer Portal.  If you have not created the newuser sign up page  you will need to do that and add the new user control from the tool box.

We are going to create a workflow that will send an email to the email on record for the contact with a link to this page and pass an id to it that we can then associate with the user that is created.  In the code behind of the Newuser page you will need this code.

public partial class Newuser : System.Web.UI.Page
    {
        private Guid _contactId;
        private string plainText;
        protected override void OnLoad(EventArgs e)
        {
            plainText = Request.QueryString["id"];
            _contactId = new Guid(plainText);
            CreateUserWizard1.CreatedUser += new EventHandler(CreateUserWizard1_CreatedUser);
        }
        private void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {
            ProfileCommon p = (ProfileCommon)ProfileCommon.GetUserProfile(CreateUserWizard1.UserName);
            p.ContactId = _contactId;
            p.Save();
            //associate the username with the contact record inside CRM
            var xrm = new XrmServiceContext("Xrm");
            var contact = xrm.ContactSet.Where(c => c.ContactId == _contactId).Single();
            contact.Adx_username = CreateUserWizard1.UserName;
            xrm.UpdateObject(contact);
            xrm.SaveChanges();
            //redirect to login page
            Response.Redirect("~/pages/login.aspx");
        }
    }

To access the AspNetSqlProfileProvider we need to create a class and we also need to add the property for the contactid that will associated our user.

using System;
using System.Web;
using System.Web.Profile;
using System.Web.Security;
namespace Site.Pages
{
    public class ProfileCommon : ProfileBase
    {
        public static ProfileCommon GetUserProfile(string username)
        {
            return Create(username) as ProfileCommon;
        }
        public static ProfileCommon GetUserProfile()
        {
            return Create(Membership.GetUser().UserName) as ProfileCommon;
        }
        public virtual Guid ContactId
        {
            get
            {
                return ((Guid)(this.GetPropertyValue("ContactId")));
            }
            set
            {
                this.SetPropertyValue("ContactId", value);
            }
        }
    }
}

One last piece needs to be added to the web.config to tie this all together.

<profile inherits=”Site.Pages.ProfileCommon”>
<providers>
<clear />
<add name=”AspNetSqlProfileProvider” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”LocalSqlServer”/>
</providers>
</profile>
Notice that I inherit my class. By doing this we are letting the AspNetSqlProfileProvider know that we have added a new property and it will pull that into the Profile table.

At this point we have used a workflow to send the invitation email to the contact but we have not set up the permissions inside of CRM.  That is the last piece and until those permissions have been set up the contact will not actually have permission to see anything inside of crm.

Posted in CRM, Customer Portal | 2 Comments

MS CRM 2011: Upgrade Helpful tid bits

Settings menu upgraded and has “unknown” everywhere???
when I imported my CRM 4.0 db into CRM 2011 my settings menus had all of these  “Unknown”‘s all over the place in the settings menu.  I found this kb article

http://support.microsoft.com/kb/2530358

Then I found this… site map editor http://sitemapeditor.codeplex.com/  much easier to use and you don’t have to mess with XML.

All I had to do was download the tool, connect to my server and load the site map.  It was pretty straight forward and very useful.

Finding 4.0 customizations and JavaScript:
CRM Documentation Generator, this is an addon for Excel and will generate all of the documentation including fields and  JavaScript mods for each entity.

http://crm4documentation.codeplex.com/

Once you find your JavaScript that is failing here is a link to what you need to change

http://community.dynamics.com/product/crm/crmtechnical/b/crminogic/archive/2011/02/19/difference-between-crm-4-0-and-crm2011-script-for-using-on-form-customization.aspx

and here is a tool for those who don’t want to figure it out

http://crm2011scriptconvert.codeplex.com/

Install VS2010 on your server:
 Yep that’s right install it.  For things like the ADX customer Portal and Plug in registration tool and manipulating XLM you will end up needing it so just install it.  I am still disappointed at the amount of things that you have “build” your self with this version of CRM.

 

 

Posted in CRM, CRM 2011 | Leave a comment

Microsoft Convergence 2012 My experience #conv12

Convergence again this year was an exciting, innovative, creative and almost overwhelming conference. Well worth the trip and all that entails. I look forward to next year. It already sounds like it will again exceed expectations for a conference.

Being a second year attendee my strategy for this conference was different but the outcome the same.  With the amount of vendors with solution intelligence, peers with shared experience knowledge, and a diverse culture of every size and shape company you can imagine to the sessions, labs, and support in person there is no way you can possibly take all of this in. You see sessions presented by favorite bloggist or the developer of and specialist for a product that has a black box in it, and of course the ones that were a last minute choice based on a conversation outside a door of a session.

This year my strategy included a list of issues people have mentioned to me  (most of I know unfortunately I may have actually uncovered a bug) over the past year. Also I bring a list of my vendors which if I love and this year I stopped by to chat and if I dint well you may have been depreciated by a new Microsoft feature. And a list of enhancements that bring me to new vendors.   I did not plan sessions ahead of time. I did the last year and ended up going to all other ones anyway. In the hotel between a couple on the fly UG sessions and the reception I picked out some more of my sessions then quickly realized ONE session I missed already. I quickly tried to fill my schedule with sessions. Empty slots I would reserve for spending time in the vendor area and looking for solutions and labs and support chats.

The night life of any conference is off the hook and I feel this is a second year convergence has raised the bar. We will just say if you weren’t there I feel bad for you. I rode a mechanical bull, drank the local Texas brew Shiner Bock , played games and watched dancers and Daughtry entertain the attendees all in the Minute maid ball park at the first reception alone. After meeting three MVP’s and my fifth bloggist I follow who also follows me and tons of professionals I was getting close to mental capacity for the first day of a conference and what was always next but the vendors to the rescue with libation party galore, entertainment and excitement to help you let loose for a bit before the next days brain bust which starts with a breakfast at the crack of dawn followed by a live musical act blasting music and lively dancers and a key note to inspire you.   I do find some many situations where you meet so many good people with a little story about what we are all there to find something.  Sometime even if you don’t know  exactly what that is when you start as you share you are constantly being enticed by other ideas that you hadn’t ever even thought of let alone came here to find and you are off on another track of things that you will try to accomplish while you are here. Needless to say the strategy gave me a plan on an ever changing road map and that worked well. Of course I know there were a lot of missed opportunities it only makes me want to buckle down and make sure I get to the next one to see if it can again exceed all expectations and send you home exhausted, enlighten, inspired and motivated to start something…..Monday. And spend the next two days catching back up on linked in with my new found contacts and friends, trying to recall anything I forgot to write down and get started on my post convergence goal list.

This slideshow requires JavaScript.

Posted in Conferences, Dynamics | 3 Comments

CRM 2011 Customer Portal: Allowing Contact Access to Multiple Accounts

In my previous implementation blog I discussed our need for our “Contractors” in our system as contacts to have access to multiple accounts through the Customer Portal.  With the eService portal our solution was to continually reassign the contacts to different accounts as they worked through cases.  This was not an ideal solution. Also with setting the account level permissions when you adjusted a contacts account assignment you were allowing other contacts of that account to view information they maybe should not have access to.

The new customer portal has this wonderful Case Access Permission which appeared to allow multiple account access, but under further review of the code I found this was not the case.

In fact the only thing that really seemed to matter was the account the contact was assigned to and the permissions set on the case access permissions level.  The code would look for a parent account assigned and then based on the permission level bring back cases for all contacts under that account or only cases for that user.  On the view cases page there is a drop down for My, Company, All.

var casesByCustomer = string.Equals(CustomerFilter.Text, "My", StringComparison.InvariantCulture)
? casesByStatus.Where(c => c.CustomerId.Id == Contact.ContactId)
: string.Equals(CustomerFilter.Text, "My Company's", StringComparison.InvariantCulture)
? casesByStatus.Where(c => c.CustomerId.Id != Contact.ContactId)
: casesByStatus;

as you can see this filters you cases, then the cases that are the companies and not yours, and then all cases.  My assumption was My company would return the cases for your assigned account, and all would bring back the cases assigned to any case access permissions you have.  Well I also noticed that when you are assigning the case access permissions the account was only a recommended setting, which told me it is probably not really looked at in the code.  I was correct.

So I end up on the CaseAccess.cs page.

Our process for entering a case is set contact and then the account is automatically set in a new_account field we added.  With that being said, we always have a contactid in the customerid field in our incidents table.

I reworked the code in the GetCasesByCustomer function to access the case access permission bring back the account id for each set of permissions and then bring back all cases that have the accountid listed in our new_accountid field.  This does two things, this actually ensures that the account cases that come back are actually account cases and not cases for a contact that has now suddenly been reassigned to a new account and it allows us to bring back cases from other accounts.

I removed this code which we did not need.  Our customerid will never return an account.  And this code actually ends up returning cases we do not want.  I want only the cases that have the account listed in our new_account field to show up in the list based on the permissions.

var findAccounts =
from a in context.CreateQuery("account")
where a.GetAttributeValue<Guid?>("accountid") == customerId
select a;
var account = findAccounts.FirstOrDefault();
if (account == null) return result;
var contacts = account.GetRelatedEntities(context, "contact_customer_accounts");
foreach (var contact in contacts)
{
result.AddRange(GetCasesByCustomer(context, contact.GetAttributeValue<Guid?>("contactid")));
}

I added this code:

IEnumerable allcaseaccess;
//use linq to pull back accountid's from adx_caseaccess
allcaseaccess = from aa in context.CreateQuery("adx_caseaccess")
where aa.GetAttributeValue<Guid>("adx_contactid") == Contact.GetAttributeValue<Guid?>("contactid")
select aa;
//loop through accounts
foreach (var access in allcaseaccess)
{
//pull cases based on accountid matching our new_accountid
var findcases =
from c in context.CreateQuery("incident")
where c.GetAttributeValue<Guid?>("new_accountid") == access.GetAttributeValue<Guid>("adx_accountid")
select c;
//list of cases to existing results
result.AddRange(findcases);
}

This is great, but you will need to add the account column to the view so the contact/consultant can see what account the case belongs to That is done inside CRM in the “Cases Web View” columns.

Now on the createCase.aspx we will need to add the ability to set the account on the form.

Add a field to form

<asp:DropDownList ID="ddlAccount" runat="server" />

then in the code behind we will need to populate that with the accounts this contact has access to.

var allcaseaccess = from aa in ServiceContext.CreateQuery("adx_caseaccess")
where aa.GetAttributeValue<Guid?>("adx_contactid") == Contact.GetAttributeValue("contactid")
select aa;
foreach (var access in allcaseaccess)
{
var accountname = from aa in ServiceContext.CreateQuery("account")
where aa.GetAttributeValue<Guid?>("accountid") == access.GetAttributeValue("adx_accountid")
select aa.GetAttributeValue("name");
ddlAccount.Items.Add(new ListItem(accountname.FirstOrDefault().ToString(), access.GetAttributeValue<Guid?>("adx_accountid").ToString()));
}

This code is added in the page_load just before the if (isPostBack) return;  this will populate the dropdown with the appropriate Text/Value pairs.

Then in the CreateButton_Click function you will need to add the code to set the account in the creation of the case.  Now accounts are technically an entity even though all it appears to need is the GUID of the account. You have to take the GUID you are handed and ask for the actual account entity reference.

EntityReference selectedaccounts = new EntityReference("account", new Guid(ddlAccount.SelectedValue));

and then add the account id to the properties to for the create incident.

var incident = new Incident
{
Title = TitleTextBox.Text,
PriorityCode = int.Parse(PriorityCode.SelectedValue),
CaseTypeCode = int.Parse(CaseType.SelectedValue),
SubjectId = subject.ToEntityReference(),
CustomerId = Contact.ToEntityReference(),
Description = Description.Text,
New_MaintContract = TargetDate.Text,
CaseOriginCode = 3,
<span style="color: #ff0000;">new_accountid = selectedaccounts,</span>
Adx_CreatedByUsername = Contact.FullName,
Adx_CreatedByIPAddress = Request.UserHostAddress
};

This is how the final create case should look

In this case the contact has access to two accounts.  Kentrox and Kentrox MEA.

Other things I should mention.  We did alter the mapping of the relationship between cases and accounts to use the new_account field we created to have the appropriate cases display in the list on an account level.

Posted in CRM, CRM 2011, Customer Portal, Dynamics | 16 Comments

CRM 2011 Customer Portal: Adding a new simple form page

In the documentation of the portal I see it having a section for adding a page.  It appears that this is mainly for additional FAQ’s or such.  I did not however see how to add a new “page” page to the customer portal.  Although most developers, BSA, and even administrators may be able to figure this out on their own this is how I accomplished the task.

First you have three basic types of pages.  The list view, a form view and just content page.  In some cases the form view is completely on its own, other times it is essentially tied to the list view for editing purposes of individual records in the list.  The case list>edit case for example.  We are adding a new simple form.  Adding a new list is a little different  and will require another blog entry

We need more than one type of contact us page on our website.  There a number of steps involved in added a new page.

You have the Portal itself where you will need to create a new web form using a master page.  The customer portal is set up with a Master page.  This is where the design of the page is held.  Most of this can be changed from with in CRM from the site settings.  The things you would not be able to change would be the actual placement.  I have not seen an actual page designer.

Start by adding a page to your solution with a master page.

If you are mimicking another page it is easy enough to just copy the code to your new page and make changes.  The important lines are:

<crm:CrmEntityFormView runat=”server” ID=”FormView” DataSourceID=”WebFormDataSource” EntityName=”lead” SavedQueryName=”Newsletter Web Form” OnItemInserted=”OnItemInserted” ValidationGroup=”ContactUs”>

I also need to change the name of the asp:panel ID and its reference in the code behind.

The savedQueryName should be the name of the view that you are going to add in CRM.  This controls what displays on the page.

Other items that you will need to change are verify

‘<%$ Snippet: ContactUs/Submit, Submit %>’

The “Snippet” concept.  Any of these little “Snippets” are stored in CRM.  You could just hard code text on the page if you wanted, but that defeats the purposed of tying this to the CRM itself.  With the Snippet you can make changes to the page with out every writing any code in the actual VS project.  Obviously you would need a developer to set up the anchors and then an administrator can make changes from there.

In the .cs of the page you may need to make changes.  Make sure all the references are there..


Now you need to go back into crm.  I do the code first then add the information to CRM but technically I think you can do it either way.

From the main menu you will go to Content Management which is where your sites are stored.  The following are elements you will need to add.

Page Template – You need a page template to tell the system where exactly you page is within the site.  Name your page.  This is what will display in the title. If you do not set the title on the Web page in the next step.

Select the website, and rewrite url.  Interesting this is the terminology used.  This will the relative path to your page with in the actual website.  This is the “real” page.

Determine if it is to be the default page.  And Save.

Web Page:  this will reference the Page template. For consistency purposes I named my template and page the same.  Again select your website. Select a parent page if there is one.   The parent page does impact site map, which in turn affects navigation.  Add a the partial url.  I have been doing these as absolute paths from the site name.  I am not 100% that this is being done correctly but it is working..

Set the page template to the one you just made or make a new one in this step.  You can set the display dates if needed.  Leave blank if this is a prement page.

Title:  will dispay as the title of the page

Sumary:

Copy: The text that will display on the page.  This needs to be in HTML format.

Web Links Sets:  If you want the page to display on the portal navigation you will need to add it to the appropriate navigation and set the order.

Code snippets: this is where you add additional text to specific places with in your page.  For this it is a confirmation message when they click the submit button.

Run your project and you page should be there.  Changes that are made inside CRM are heavily cached.  Sometimes it takes several tries of running the remove cache page, saving the web config and other cache deletion strategies to see changes.  That can be frustrating. And it makes it difficult to know when you have made changes in the wrong place or if the cache has just not caught up.

Viewing the Customer Portal as the basis for essentially a content management system, I think this is a pretty good solution.  It has a lot of the ground work done for you.  With a little poking around it is pretty easy to figure out what you need to do to make changes.  I would not however classify this as a No-development needed solution.  I have read some information that the “paid for” version from Adx Studios would not require this amount of work to add a new page.  Can not verify that information at this time.

Now that I have reviewed the customer portal Administration guide thoroughly.  I have decided to see how far the add a page functionality takes us before I post this blog.  I am not a huge WYISWYG editor individual, so when I clicked on the “new page” button I was greated with a nice little generic error message “An error has occured while loading content required for this feature”…. not suprised.

Good thing this fellow bloggist has posted the solution…http://jianwang.blogspot.com/2011/05/customer-portal-2011-error-has-occurred.html ok, not complete solution to error you then have to do this http://forums.asp.net/t/1195663.aspx which states you can only have one type of authentication.  Well if you looked at my Implementing eService authentication you will see I need windows integrated authentication.. which this states I need to turn off…. conundrum!  Fix.  Set windows integrated auth and anonymous on the main Virtual Directory for your site, then on the services/crm.sv page uncheck integrated auth.  you will have to restart IIS to get these permissions to stick.

So once you add a page.

In the new page dialog you are given the opportunity to select an existing page template.  There a ton out of the box.  This solution does not create an actual new page in the VS solution.  If the pages that are included are not going to fulfill the needs of the new page being added then the rest of this blog post will be necessary.

“Page” seemed like the most logical template to choose.  It will need all of the guts to be added to actually use the page for content. I only get access to change the header links, and footer upon saving and creating this new page.

So from what I gather.  This is still not a complete no-code necessary add page solution.

Posted in CRM, CRM 2011, Customer Portal, Dynamics | 19 Comments

CRM 2011 Customer Portal Attachment File download

As I work through the customizations for the customer portal.  I am very impressed with the OOB functionality that is already in this version as opposed to what was available with eService.

For eService I had to add features like, displaying both Closed and Active cases and add the filter functionality.  I was very pleased to see this type of thing was already in the Customer Portal.

Another feature that was not available was for documents that were attached as a notes for service cases.  It was fairly easily to add this functionality to eService and I was very excited to see that this functionality appeared available in Customer Portal.  Well not exactly.  I have not verified this completely but the link in the code resolved to _entity/annotation/Guid .  After scouring the code, the pages templates, links, and pretty much everywhere I could not find where this was supposed to be going.  It is possible that something was configured incorrectly, but with time of the essence in an upgrade situation, I decided to rework the code I wrote for eService.

First you will need to change the URL on the editcase.aspx page to point to the page we are going to create.  I commented out the line of code that was there and the second line is the code that points to our new page.

<%--<asp:HyperLink CssClass="note-attachment" NavigateUrl='<%# (Container.DataItem as Entity).GetRewriteUrl() %>' Visible='<%# Eval("FileSize") != null %>' runat="server"><%# Eval("FileName") %>&nbsp;(<%# Eval("FileSize") %>)</asp:HyperLink>--%>
 <asp:HyperLink ID="HyperLink1" CssClass="note-attachment" NavigateUrl='<%# Eval("AnnotationId", "~/pages/eservice/download.aspx?annotationid={0}") %>' Visible='<%# Eval("FileSize") != null %>' runat="server"><%# Eval("FileName") %>&nbsp;(<%# Eval("FileSize") %>)</asp:HyperLink>

Then I added a page to my Customer Portal Project called download.aspx.  Then I removed all code from the page except for the declaration at the top of the page.  In the code we are going to use the Response.OutPutStream.Write to basically convert this page to the document you are downloading.

below is the only line of code necessary for aspx page.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="download.aspx.cs" Inherits="Site.Pages.eService.download" %>

then in the code behind:

using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk.Query;
using Xrm;
using System.Linq;
using Microsoft.Xrm.Portal.Access;
using Microsoft.Xrm.Portal.Cms;
using Microsoft.Xrm.Portal.Core;
namespace Site.Pages.eService
{
   public partial class download : PortalPage
   {
    private Guid _annotationId;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!String.IsNullOrEmpty(Request.QueryString["annotationid"]))
           {
             _annotationId = new Guid(Request.QueryString["annotationid"]);
            }
           //create a new context to the Xrm to pull the annotationset back
           var contextnote = new Xrm.XrmServiceContext("Xrm");
           var retrievedAnnotation = (
                 from note in contextnote.AnnotationSet
                 where note.AnnotationId == _annotationId
                 select new
                {
                  note.FileName,
                  note.DocumentBody,
                  note.FileSize,
                  note.MimeType
                 }
            );
      //loop thorugh the return to create the out put stream.
      foreach (var annotation in retrievedAnnotation)
      {
          Response.ContentType = annotation.MimeType;
          byte[] buffer = Convert.FromBase64String(annotation.DocumentBody);
          int filesize = buffer.Length;
          Response.AddHeader("content-disposition", "attachment; filename=" + annotation.FileName);
          Response.OutputStream.Write(Convert.FromBase64String(annotation.DocumentBody), 0, filesize);
      }
    }
  }
}

So in the code you are requesting the GUID from url and then passing that to the linq to sql querry which brings back all the infromation you need to generate the document.

Feel free to comment and let me know what you think.

Posted in CRM, CRM 2011, Customer Portal, Dynamics | 17 Comments

MS CRM 2011 Customer Portal Implementation using eService Membership authentication

The accelerators provided for use with MS CRM 2011 are a starting point and are intended to modified. In CRM 4.0 we used eService, but we need to move from the eService accelerator to the new Customer Portal with the upgrade to CRM 2011.

One of the things that put me off immediately was the change in the authentication.  I understand that the LiveID provides a plethora of advantages, but most companies are trying to do these types of upgrades seamlessly.  If you have authentication already set up for your customers asking them to redo their authentication almost makes you look incompetent.  With all of that said.  I am implementing the customer portal without the LiveID authentication. This means that I  skip some steps in the installation guide as they will not be relevant to my implementation.

Link to the Portal Download http://dynamics.pinpoint.microsoft.com/en-us/applications/customer-portal-for-microsoft-dynamics-crm-2011-12884910826

I have the download of the customer portal on two servers.  The one I have on my actual CRM server and the one I have on my web development server.  Extract the contents of the cab file you have downloaded on both servers.

We start by working on the CRM server and getting the solution imported into CRM.

Using the installation guide which is under documentation in the cab file you downloaded.  I am doing an On-Premise installation.

I pretty much skipped all of the prerequisites in the documentation and started with the Deployment step #1. It is pretty intuitive and I basically just followed along easily.

The import file that you will need for c.  is kind of buried in the folder… \customerportal\CustomerPortal.zip\CustomerPortal\CustomerPortal\MicrosoftXrmCustomerPortal.cab which is in the extracted cab file.

Step 2 is not going to be relevant either for my implementation.  The invitation process will be addressed later.

Step 3.  Not as intuitive.  You will need to find the Websitecopy.exe inside of the sdk that you should have also downloaded.

SDK download link http://www.microsoft.com/download/en/details.aspx?id=24004

I used the alternate approach using the GUI.  and followed steps a-g.  These were fairly intuitive.  For my authentication I selected Integrated.  I stopped at step 4 because this deals with registering your application against the WILD you would have set up, that I did not.

So right now my site has been imported into CRM and I have another version of it sitting in Dev environment on web server.  You are not going to have your Customer Portal on the same server as your CRM, but you do need to get your customizations into the version on your web server. This is done with the CrmSvcUtil file inside the \customerportal\CustomerPortal.zip\CustomerPortal\CustomerPortal\CustomerPortal\crmSvcUtil

This is a command file that you can open in note pad.  This command regenerates the Xrm.cs file which you will need to copy from the CRM server to the new web server where your portal will live.  Open the CrmSvcUtil and remove the first line that is for online.

The one you want to use should look like this below.

$0\..\..\Microsoft.Xrm\bin\CrmSvcUtil /codeCustomization:”Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration” /out:Xrm\Xrm.cs /url:http://Crm/Contoso/XRMServices/2011/Organization.svc /domain:CONTOSO /username:administrator /password:pass@word1 /namespace:Xrm /serviceContextName:XrmServiceContext /serviceContextPrefix:Xrm

You will need to update the red items to your environment.  One issue I ended up with is that this will by default this spit out everything in this file, which you will see the issue with that after you copy that file over the one in your web server project. If you have items in multiple entities you will get a lot of duplicate attributes in the get set properties area that you will need to remove or address.  All of the duplicates I had were easily just removed and not needed.  Problem with this approach is if I add additional custom fields and need to regenerate this file again I will have to go through that process of removal again.

Now I need to open the Customer Portal solution and to set it to work with my existing authentication I sparingly followed this blog to remove the references to the LiveID authentication.

http://www.shanmcarthur.net/crm/developers-corner/customer-portal-modifications-for-demo-vpc-without-internet-connectivity

Some of the code in the Portal had changed from when It was written, but I found I could muddle through it pretty easily.

I needed to make different changes to my web.config to use the aspNetSqlMembershipProvider . I added a new connectionstring that referenced in the following code.

I then set Directory Security to Integrated Authentication in IIS.

Now I have users already assign to users inside of my existing ASP membership.  I will need to reassign those.

I created a page in  Customer Portal called newuser.aspx and added the following asp:createuserwizard control.

I added this newly created page to the contact entity form as a iFrame referencing the URL in my Customer Portal site and added above the web authentication tab.

The administrator will create the new user in the wizard and simply assign the username to the contact and set the logon enabled all right there in CRM.  I do not need to do anything with any of the other fields at this point.  I will probably end up with an iFrame that will allow me to manage all of those items directly from the ASP Membership controls

I hate what I have done here… please reference my new post for a more streamlined contact sign up https://dorothyjarry.com/2012/04/09/ms-crm-2011-customer-portal-contact-sign-up/ it uses a workflow to send an invite and the contact creates their own credentials like the original eService

The next part is to set up the Case Access Permission, Account Access Permission and Contact Access Permission.

The system will allow you to add access to multiple account’s cases, but I have not found that it will actually display any of the cases that are not assigned to the parent account of the contact or to a contact who also has the same parent account depending on the scope of the access.  I am still looking for a way to access that functionality.  I feel that allowing contacts to have access to multiple cases, for instance where it is a service technician who enters cases or is a consultant that works with multiple accounts.  At this time we end up with multiple contact records for the same user.

Good luck with your Customer Portal implementation and let me know if I can be assistance.

Posted in CRM, CRM 2011, Customer Portal, Dynamics | 12 Comments