Service Manager Portal Source Code Released!

Service Manager Portal Source Code Released!

Rate This
  • Comments 62

The feedback on the self-service portal has consistently been that it needs to be more customizable.  That is by far the #1 feedback item on SCSM 2010.  The types of desired customizations typically fall into these categories:

  • change the text shown in a label
  • hide buttons or web parts
  • change the style (colors, fonts, etc.)
  • change the layout
  • show more or less information
  • add additional capabilities
  • add languages or allow users to choose which language the portal is displayed in

Most of these things ideally would be configurable options on the web parts and there would be some sort of administrative UI which allowed you to change these things.  Making things like that configurable via an admin experience requires significant development and test time which unfortunately we didn’t have in the 2010 product development cycle.  That is what we are shooting for in the vNext version (currently code named “R2”) of the SCSM portal that we are super excited to show you at the Microsoft Management Summit for the first time.  The vNext portal will be based on SharePoint 2010 (any version including Foundation).  It will be made up of web parts.  You can change the text shown on labels, change fonts, change the style, change the layout, etc. using standard SharePoint administrative experiences and tools.  It will be relatively easy to add new content to the portal by creating web parts that use the SDK and plugging them into the SharePoint site.  You will also be able to add languages or change display strings by modifying the string resource files.  We will let the user choose which language they want to display the console in.  The portal will be a single SharePoint site instead of an analyst portal and an end user portal, but the user experience will be role based so people only see what they need to see.  In short, it will be what we all wished the SCSM 2010 portal could have been.

In the meantime, we know that the lack of customizability of the portal is a pain point for customers right now.  Many of the modifications that customers want to be able to do are relatively trivial to make if you had the source code and a little bit of know how.  To help customers achieve their goals for a customized self-service portal in the near term, we are releasing the source code to the portal today.  Not everybody has Visual Studio and a developer on hand to make these customizations, but a lot of our customers do.  Some of our SCSM administrators, consultants, and SI partners are even developers at heart and are excited about the possibility of making the self-service portal do what they want it to do.  We realize this isn’t ideal to have to modify code to get what you want, but it is better than not being able to modify it all!  Hopefully this will suffice while we are busy building the new portal.

But we also have another fun surprise!  We are also including a newly styled portal in this download that you can deploy with copy/paste of some files.  The new site looks like this:

image

It is styled to look similar to the SharePoint 2010 default site template:

image

Looks a lot better huh?!

This updated version of the portal is also intended to show you some of the possibilities for customizing the portal.  The updated version of the portal has the following modifications:

  • style changes – modified CSS stylesheets
  • when you click in the knowledge search textbox the text actually clears instead of staying there

image (new) vs. (old) image

  • you can update incidents from the portal!

image

  • The “where am I at?” highlighting has been removed so that it doesn’t show step 1 highlighted when you are on step 2.  Do we really think people are going to get lost in a three step wizard?

image

  • I’ve added a new Request New User option and associated web part to show how you can extend the self-service portal to gather inputs that are directly mapped to an automated activity that can drive a workflow.

image

image

Results in a new change request being created with an automated activity that looks like this:

image

image

When the automated activity kicks in it will create a new user in Active Directory using PowerShell:

image

image

I’ve commented most of the code where I have made modifications with “PORTALMOD” so you can search through the code base and easily see all of the modifications that I made.

So – to recap, this new release includes:

  • The source code of the portals that ship with the product
  • A updated version of the portal with the bug fixes and features described above
  • The modified source code for the updated version of the portal
  • A document describing in detail how to modify, build, and deploy the portal

I’ve also attached the MP to this blog post that is need to make the new user provisioning scenario go.  Please don’t use this in production though!  I have spent minimal time testing it as it is just an example of what you could do.  To deploy it you just need to import the MP .xml file and put the workflow .dll file in the C:\Program Files\Microsoft System Center\Service Manager 2010 directory.

I also want to discuss what the roadmap is for the portal.  The SCSM 2010 SP1 portal is an ASP.Net web site that hosts web parts.  Those web parts can be put on a SharePoint site.  The results are not great but you can do it and it can be made to look good now that you have the source code.  So, in that sense what we have done for the SCSM 2010 and what we are doing for the SCSM vNext portal are similar, the only difference being that in vNext we will require SharePoint as the hosting framework for the web parts.  So – in theory you could port your web parts that you develop today to run on the vNext portal since it is all just SharePoint and web parts.  The only little detail there is that the web parts you create today using the source code provided will use a different way of accessing the data than the vNext portal will.  We are still sorting out the details of that and whether or not you could mix/match 2010 web parts with vNext web parts on the same SharePoint server, but I think we’ll be able to make it work.

Lastly, I just want to make sure that everyone is clear on what this release is.  Think of it as a shortcut to developing your own custom portal using the Service Manager SDK.  We have effectively shown you how to do it and provided some sample code .  Whatever you create is like you created it from scratch.  If there is a bug in a modified portal then you won’t be able to call Microsoft support about it.  I hope that makes sense and seems fair.  If there is a bug in the SDK somewhere then of course you can call Microsoft support about it.  Of course we are here to help you on the forums and blog if you need some help getting started, have questions, or want to discuss a bug.

I’m really looking forward to seeing what people do with this.  We have had some internal groups here at Microsoft take this source code and do this already and it has worked out great.

Download the files from the Microsoft Download site here:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=65fbe0a3-1928-469f-b941-146d27aa6bac&displaylang=en

You can also download this from MSDN or TechNet if you are a subscriber - the release there is called the 'Service Manager Portal SDK'.

Big THANKS to Paresh (the Microsoft developer on the original portall that helped pull this together), the marketing team for funding the portal style update, and all the community beta testers that validated this release for us!

Enjoy!

Attachment: ProvisionNewUser-New.zip
Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post
  • Hi @Travis.

    Do you have an example, or any doc of how i can get business services within portal or using SDK?

    I need show them in a combo box for user selection and then add that service in a change request and finally save to scsm using the portal.

    Regards.

  • @Geovanny

    Check this out:

    blogs.technet.com/.../how-to-get-a-list-of-services-using-the-sdk.aspx

  • i hide succesfully the link in the new portal, but only in the home page of the end user, but in the knowdeledge pages the links appears... i change in the knowdeledges pages but the links still appears...

    <SM_WebParts:KnowledgeArticleDetails ID="KnowledgeArticleDetailsWebPart" runat="server"

                           Title=" " ShowResetPasswordLink="false" ShowRequestSoftwareLink="false" BorderStyle="None" ChromeType="TitleOnly" Width="100%" />

    is there a way to hide this ??

    Thanks.

  • I was just looking for some workaround to change time zome displayed in self service portal and I just found out the I have to hire a developer and buy visual studio... too bad, microsoft... you are always the same

  • @same old story

    Yeah, I agree with you.  It would be better if we had a simple setting to change the time zone.  If you are a bit adventurous you can make this change without development skills by following the step by step instructions.  You also dont need to purchase Visual Studio.  You can just use Visual Studio C# Express which is free.

    www.microsoft.com/.../visual-csharp-express

  • Hi Travis,

    I have a Problem setting up a new interface.

    I can't figure out how to fetch the values for drop-down lists from the database. I tried looking at the code of the original site, but as it's made with web-parts (which I'm not very familiar with) I couldn't find the right part.

    Could you help me with this? Is there a code-snippet I could use to get started?

    Thanks alot!

    Jens

  • @Jens-

    Have a look at the implementation of GetCategories in CreateRequest.cs

  • Hi Travis,

    I have other trouble.

    I downloaded your source code, but when I try to open the VisualStudio project, it tells me it can't find  EndUserPortalResources.resx - eventhough it is there.

    Do I need to put it in a subdirectory or copy it elsewhere?

    Thanks for your help!

  • @Jens - try removing it from the project and then adding it again

  • Hi Travis,

    thank you, that solved it!

    Now, when I try to create a CategoryWrapper, I get an errormessage that says something like "Object reference was not set to an object instance" (I translated that from german, so it might be slightly different)

    Here's what I did:

    this.sdkQueryUtility = new SdkQueryUtility();

    Guid baseEnumerationId = true ? Constants.ChangeRequestClassificationId : Constants.IncidentClassificationId;

    CategoryWrapper categoryWrapper = CategoryWrapper.IntializeCategoryWrapper(this.sdkQueryUtility, baseEnumerationId);   <-- that's where I get the error

    Any clue why this happens?

    Thanks alot for your help!

  • Hi Travis,

    Seems like the Portal Code is very popular from the posts.  All very useful as i'm new to this, thank you for your time replying to everyone.  

    I have been working my way through the portal and found that the action log for a request doesn't show in time order.  It appears to show in action type order, sub ordered by time (the code seems to show this as well).  This makes it difficult to follow for the end user.  The console shows the action log correctly.

    Is there something in the SDK to merge "Constants.ActionLogs", "WebpartsConstants.UserCommentsComponent" and "WebpartsConstants.AnalystCommentsComponent" or does this have to be done manually before sorted and displayed to the user?

    Thanks

    GDWelsh

    P.S. I'm a novice coder, be gentle

  • I followed the guide in the download as well as the guide by Anders Asp (http://www.scsm.se/?p=398) and have come up with the error below every time.

    [NullReferenceException: Object reference not set to an instance of an object.]

      Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.SdkQueryUtility.GetClass(Guid classId) in C:\SCSM_Source_Code\SCSM2010SP1PORTALSOURCERELEASE\SourceCode\New\PortalSource-New\Common\DataAccess\SdkQueryUtility.cs:1064

      Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.SdkQueryUtility.GetCurrentUser(String userName, String domain) in C:\SCSM_Source_Code\SCSM2010SP1PORTALSOURCERELEASE\SourceCode\New\PortalSource-New\Common\DataAccess\SdkQueryUtility.cs:2642

      Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.UserIdentification.RenderChildren(HtmlTextWriter writer) in C:\SCSM_Source_Code\SCSM2010SP1PORTALSOURCERELEASE\SourceCode\New\PortalSource-New\Common\Controls\UserIdentification.cs:222

      System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +12

      System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +41

      System.Web.UI.WebControls.WebParts.WebPartChrome.RenderWebPart(HtmlTextWriter writer, WebPart webPart) +996

      System.Web.UI.WebControls.WebParts.WebPartZoneBase.RenderBody(HtmlTextWriter writer) +1169

      System.Web.UI.WebControls.WebParts.WebZone.RenderContents(HtmlTextWriter writer) +261

      System.Web.UI.WebControls.CompositeControl.Render(HtmlTextWriter writer) +68

      System.Web.UI.WebControls.WebParts.WebPartZoneBase.Render(HtmlTextWriter writer) +448

      System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +239

      System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +252

      System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +86

      System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +52

      System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +239

      System.Web.UI.Page.Render(HtmlTextWriter writer) +37

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239

    Any ideas?

  • @NullReferenceException - attach your debugger to the w3wp process.

  • @Travis - I hope this isn't a double post, but I didn't see my original post make it on.  The error is occuring on Line #1064 of the SdkQueryUtility.cs file in hte GetClass Method.

        The line reads: return SdkConnection.ServiceManagementGroup.EntityTypes.GetClass(classId);

    Here is the information from my Debugger:

    + $exception {"Object reference not set to an instance of an object."} System.Exception {System.NullReferenceException}

    + this {Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.SdkQueryUtility} Microsoft.EnterpriseManagement.ServiceManager.Portal.Common.SdkQueryUtility

    + classId {eca3c52a-f273-5cdc-f165-3eb95a2b26cf} System.Guid

    Do you want me to add any other watches?  What other information do you need?  I have not customized the product in any way, just ran the build process.

  • First I fixed the issues with not finding the resource file names (EndUserPortalResources.resx).

    After doing this, though, the application STILL DOES NOT WORK!!!

    I set up the source code on the SCSM server with the EndUser and Analyst portals. Checked all the references – none were broken. Compiled the application successfully. When I ran it (F5) I got this error message:

    Assertion Failed: abort retry quite…

    Unable to connect to the Service Manager Data Access service.

    Has anyone actually gotten this to run? If so, can you please provide some insight on how you did it?

    Thanks.

Page 3 of 5 (62 items) 12345