Developer Training Guide

Lab Workbook

Table of Contents

Chapter 1: Portals Overview

Chapter 2: Deployment

Exercise 1: Installing Adxstudio Portals

Exercise 2: Practice Using the WebsiteCopy tool

Chapter 3: CMS Components

Exercise 1: Add new web pages

Chapter 4: Content Publishing

Exercise 1: Add Web Pages using Front-Side Editing

Experiment

Chapter 5: Security

Exercise 1: Configure Invitation Sign Up

Experiment

Exercise 2: Configure Web Role and Assign Web Access Permissions

Chapter 6: Community Features

Exercise 1: Add a Forum

Exercise 2: Add a Forum Thread

Exercise 3: Add an Idea Forum

Exercise 4: Add an Idea

Exercise 5: Add a Blog

Exercise 6: Add a Blog Post

Chapter 7: Portal Theming

Exercise 1: Edit the Copy of a Page Using Bootstrap Elements

Exercise 2: Roll a Custom Bootstrap Theme for your Portal

Chapter 8: Displaying Forms

Exercise 1: Edit a CRM Form for lead

Exercise 2: Create a Managed Form on the Portal

Exercise 3: Create an Entity Form on the Portal

Exercise 4: Set Up a Web Form

Exercise 5: Set up a Survey

Experiment

Chapter 9: Displaying Views

Exercise 1: Surface a CRM View as Entity List

Exercise 2: Add an Edit Form to the Leads List

Chapter 10: Event Management

Exercise 1: Add Events to Basic Portal

Chapter 11: Customer Support

Exercise 1: Manage Cases

Chapter 12: Service Requests

Exercise 1: Create a new Service Request on the Portal

Exercise 2: Create a new Service Request Entity

Exercise 3: Create the Web Form and Service Request Type

Chapter 14: Portal Structure

Exercise 1: Add forums to Basic Portal

Chapter 15: ASP.NET Web Controls

Exercise 1: Add a new Page Template

Exercise 2: Add a Property Control

Exercise 3: Add CrmHyperLink and Snippet controls

Experiment

Exercise 4: Add a Weblinks Control

Exercise 5: Add a CrmSiteMapChildView Control

Exercise 7: Add a CrmMetadataDataSource control

Chapter 16: Managed Forms

Exercise 1: Edit a CRM Form for lead

Exercise 2: Create a Managed Form on the Portal

Chapter 17: Managed Lists

Exercise 1: Add a CrmDataSource Control

Exercise 2: Add a SavedQueryDataSource Control

Exercise 3: Render a grid using the SavedQueryColumnsGenerator

Exercise 4: Use the Portal Context to determine the current user Contact

Exercise 5: Add Edit capability to your grid using Site Markers and an Entity Form

Experiment

Chapter 18: Portal Development Basics

Exercise 1: Query CRM using early-bound classes

Experiment

Exercise 2: Query CRM using late-bound methods

Experiment

Exercise 3: Add a Comment Control

Exercise 4: Add a Rating Control

Chapter 19: Ads and Polls

Exercise 1: Add an Advertisement to the Basic Portal

Exercise 2: Add an Poll to the Basic Portal

Chapter 20: MVC

Exercise 1: Use the Attribute Helpers

Experiment

Exercise 2: Use the Site Setting Helpers

Experiment

Exercise 3: Use the Site Marker Helpers

Exercise 4: Use the Snippet Helpers

Experiment

Exercise 5: Use the Web Link Helpers

Experiment

Exercise 6: Add an MVC App

Chapter 1: Portals Overview

There are no true exercises for this chapter, but this is a good time to check out

Familiarize yourself with the documentation, check out the forums, and begin planning your projects and potential projects that involve Adxstudio Portals.

Chapter 2: Deployment

Use Adxstudio’s Demo builder to set up a demo portal experience. You will probably be asked to do this before the training course begins, as there is a fair amount of downtime involved.

Perform the following instructions:

  1. Visit and sign up for a new CRM Online trial. Be sure to log into your new org and select the US Dollar currency before continuing. You should not continue to the next step until you have successfully logged into CRM and can see the main CRM console screen.
  2. Log into the Demo Builder website at and set up a profile for your contact information. This website shares a membership database with our community site and will give you the ability to participate in discussion forums and other features on our community site. Please use real contact information as we regularly prune contacts with false information and your demo could turned off as a result.
  3. Enter a unique domain name for your trial (domainname.demo.adxstudio.com)
  4. Enter the CRM organization URL for your CRM Online trial
  5. Enter administrative username and password credentials.
  6. Agree to the terms of use and click the Create Demo button.
  7. Wait for an email that tells you that your environment has been configured.
  8. For the duration of the trial, you can visit your unique domain name (under demo.adxstudio.com) to view the status of the demo and access your sample website

Exercise 1: Installing Adxstudio Portals

In this exercise we will get Adxstudio Portals installed on your local workstation.

Exercise 1a: Install Web Project
  1. Navigate to community.adxstudio.com
  2. Click the download link to download the latest Portals .msi file.
  3. If you do not have an account, you will be asked to create one before you can download
  4. Install the .msi file, to the default location (Program Files(x86)
  5. Open IIS
  6. Click Add Website…
  7. Site Name: Basic Portal
  8. For Physical Path, browse to C:\Program Files(x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Samples\MasterPortal
  9. Set the Port number for the website or specify a specific host name, and click OK
  10. Ensure that the app pool for the portal is set to .NET framework version 4.0.
  11. Open VS 2012
  12. Open The AdxstudioPortals solution file found under C:\Program Files (x86)\ADXSTUDIO\XrmPortals\Samples
  13. Expand Master Portal
  14. Open web.config
  15. Modify the connection string to match your CRM online trial org’s URL, for example:

addname="Xrm"connectionString="ServiceUri=

  1. Open IE and browse to the websiteUsername=; Password=*********;"/>
  2. Open the web.config again
  3. Modify the <portals> node under <Microsoft.xrm.portal> (near the bottom of the file) so that the websiteName=“Basic Portal”
  4. Rebuild the web project.
  5. Open IE and browse to the website
Exercise 1b: Install License Key
  1. After you have downloaded the Adxstudio Portals solutions from Adxstudio.com, you will receive an email with a license key for a trial version.
  2. Open the attachment (which is an XML file).
  3. Copy the contents of the file to the clipboard.
  4. Open CRM and navigate to the Settings Page.
  5. Click on Adxstudio License Keys (under the Extensions group).
  6. On the Ribbon, click the new button.
  7. In the Name field, enter: License Key.
  8. Paste the contents of the XML file that you had earlier copied to the clipboard.
  9. On the Ribbon, click the Save and Close button.

Exercise 2: Practice Using the WebsiteCopy tool

This exercise is meant solely to allow you to practice using the WebsiteCopy tool. We will not be using the imported portal at any point in our future exercises. Note that we are using an XML file that contains the DATA for basic portal – so we will be creating a copy of basic portal and giving it a different name.

  1. Navigate to C:\Program Files (x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Utilities
  2. Open WebsiteCopy.exe
  3. Select “XML File” as the source of the website you will be copying
  4. Click Next to select the name of the XML file you will be importing.
  5. Click Browse
  6. Navigate to C:\Program Files (x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Samples
  7. Choose Basic Portal.xml
  8. Click Next
  9. Click Next
  10. We now choose the destination of the websitecopy; make sure Microsoft Dynamics CRM server is selected.
  11. Click Next
  12. Enter your Discovery URL; to find this URL
  13. Open IE
  14. Navigate to the URL of the CRM trial you created in preparation for this training course and log in
  15. Navigate to Settings > Customizations > Developer resources > Service Endpoints
  16. Under Discovery Service you will find a URL; in Websitecopy.exe choose from the dropdown the URL that matches your discovery URL. For example
  17. Enter your credentials and click Next
  18. Click Connect
  19. Enter Imported Portal as the website name
  20. Click Next
  21. Click Create Website

In CRM

  1. Once the utility is finished, navigate to CRM and refresh
  2. Navigate to portals.
  3. Open Imported Portal
  4. The content for imported Portal is IDENTICAL to basic portal, because we haven’t changed anything. So let’s change something to see a difference.
  5. Click Web Page
  6. Open the Home page
  7. Replace the entire Copy section with the content of your choice (type in anything you want). Be sure to replace the entire section.

In VS 2012

  1. Open the web.config again
  2. Modify the <portals> node under <Microsoft.xrm.portal> (near the bottom of the file) so that the websiteName=“Imported Portal”
  3. Rebuild the web project.
  4. Open IE and browse to the website
  5. Go Back and Modify the web.config again.

Now we will switch back the portal to the standard portal for the remainder of the exercises.

  1. Modify the <portals> node under <Microsoft.xrm.portal> (near the bottom of the file) so that the websiteName=“Basic Portal”

Chapter 3: CMS Components

Exercise 1: Add new web pages

In this exercise, we will be creating new pages within Dynamics CRM 2011 which will subsequently be displayed within the Basic Portal.

Perform the following instructions:

  1. Open Internet Explorer and navigate to your CRM online trial org.
  1. Click the Portals area of the SiteMap (left-hand navigation).
  2. Click Websites.
  3. Click Basic Portal to open the Basic Portal website record.
  4. Select Web Pages.
  5. On the ribbon, click the Add New Web Page button.
  6. Complete the following fields:
  7. Name: News
  8. Website: Basic Portal
  9. Parent Page: Home
  10. Partial Url: news
  11. Display Date: today’s date
  12. Page Template: Page
  13. Publishing State: Published
  14. Copy: This is the news page.
  15. Display Order: 9
  16. Leave the remainder of the fields on the form at their default values for now.
  17. Click the Save and New button on the ribbon to save the record and open a new one.
  18. When the new dialog is displayed, complete the following fields:
  19. Name: News Article One
  20. Website: Basic Portal
  21. Parent Page: News
  22. Partial Url: article01
  23. Copy: Lorem Ipsum
  24. Display Order: 10
  25. Display Date: today’s date
  26. Page Template: Page
  27. Publishing State: Published
  28. Click the Save and New button on the ribbon to save the record and open a new one.
  29. When the new dialog is displayed, complete the following fields:
  30. Name: News Article Two
  31. Website: Basic Portal
  32. Parent Page: News
  33. Partial Url: article02
  34. Copy: Dolor
  35. Display Order: 11
  36. Display Date: today’s date
  37. Page Template: Page
  38. Publishing State: Published
  39. Click the Save and Close button on the ribbon to save the record and close the page.
  40. Select Web Link Sets.
  41. Open Primary Navigation.
  42. Click once on the Links grid on the form.
  43. Click the Add New Web Link button on the ribbon.
  44. Name: News
  45. Page: News
  46. Publishing State: Published
  47. Click Save & Close

In VS 2012:

  1. Refresh the Adxstudio cache by resetting the Basic Portal in IIS or Rebuilding the Basic Portal Project in VS 2012
  2. Navigate to the Basic Portal website in IE
  3. You will notice that News now appears on the primary navigation bar at the top of the page.
  4. Click on News
  5. Notice the Child links that appear. These are being generated by the “Page” Page Template.

Chapter 4: Content Publishing

Exercise 1: Add Web Pages using Front-Side Editing

In this exercise we will add new pages using the Front-Side editing feature.

Perform the following steps:

  1. Navigate to Basic Portal
  2. Click Sign In in the upper right-hand corner.
  3. Sign in as administrator:
  4. Username: administrator
  5. Password: pass@word1
  6. Navigate to the Content page by clicking the link on the primary navigation.
  7. From the floating-menu, click the New button then select Child Page.
  1. Complete the following properties:
  2. Name:Example Content
  3. Copy: This is the Example Content page
  4. Leave the remainder of the properties at their default values.
  5. Click the Save button to save your changes.
  6. Move your mouse over the Primary Navigation and click the Edit button.
  7. Click the Add button (green plus).
  8. Complete the following properties:
  9. Name: Example Content
  10. Page: Example Content
  11. Click the Save button to save the new navigation link.
  12. Click the Save button to save your changes to the Primary Navigation.
  13. After the page reloads, you should see your new pages on the Primary Navigation bar.
  14. Navigate to Example Content page
  15. Click to create a child file. Upload a sample picture from your documents folder (or download a free image from Bing images and upload that)
  16. After creating the child file, try editing the “copy” attribute of the page and adding the child file, using the file picker.

Experiment

1)Try Utilizing different page templates - take note of how different page templates render content, shortcuts and links in different ways. Try adding Shortcuts, Links, Files in different ways. Try experimenting with the tinyMCE editor to add rich content to the copy of your web pages: Tables, lists, etc.

Chapter 5: Security

Exercise 1: Configure Invitation Sign Up

In this exercise we will configure sign-up for new users to the portal. Note that by default new CRM online orgs are not configured for email routing, so we won’t make use of any of our email workflows. However, your instructor

Portal

  1. Navigate to your Basic Portal website
  2. If you are signed in, sign out
  3. Click to Sign In
  4. On the Sign In page, instead of signing in, attempt to ‘sign up’. The link to sign up is located in the grey panel above the sign in form.
  5. Create an account:
  6. Username: jdoe
  7. Password: pass@word1
  8. Question: Yes or No?
  9. Answer: Yes
  10. You must now fill out your profile info. Note that you are already a portal user at this point, but before you can use the site’s features you must fill out basic contact info:
  11. First Name: Jon
  12. Last Name: Doe
  13. Email: [your email]

CRM:

  1. Navigate to Contacts via Workplace
  2. Note the contact that was created.
  3. Open up the contact
  4. You may be in the new “metro-style” touch interface for CRM 2011. This view is currently incompatible with multiple forms, so we will turn it off for now. If you are already in classic view, ignore this step.
  5. Locate three small dots at the top left-hand side of the screen
  6. Click on them
  7. Choose Switch to classic view
  8. Navigate to the Portal Contact form and view the Web Authentication tab to view the fields created that associate this contact to the new portal user.
  9. Navigate to Portals
  10. Open Basic Portal
  11. Navigate to Site Settings on the left-hand navigation pane
  12. Open the Authentication/Registration/Enabled Site Setting
  13. Set its value to “false”

Portal

  1. Rebuild your project in VS 2012
  2. Navigate to the Portal and go to the Sign In page
  3. Note that now you cannot Sign up; the website is invitation-only

Experiment

1) Attempt to set the authentication mode so that you can freely sign up, but portal access is not granted until a confirmation email is responded to. Use the Authentication/Registration/RequiresConfirmation Site Setting (set the ../../RequiresInvitationSite Setting back to “false”). Note that unless you install Microsoft CRM for outlook emails won’t work.

Exercise 2: Configure Web Role and Assign Web Access Permissions

In this exercises we will be creating two web roles and experimenting with how different permissions restrict what these roles can and cannot do in terms of the portal. To this end we will be adding nodes to the site map and then granting our user read/change to these nodes.

In CRM:

  1. Navigate to Portals, Web Sites.
  1. Open Basic Portal.
  2. Click on the Web Pages navigation link on the left-hand side
  3. On the Ribbon, click on the Add New Web Page button.
  4. Complete the following fields:
  5. Name: Statistics
  6. Website: Basic Portal
  7. Parent Page: Home
  8. Partial Url: stats
  9. Display Date: today’s date
  10. Page Template: Page
  11. Publishing State: Published
  12. Copy: This is the statistics page.
  13. Display Order: 9
  14. On the Ribbon, Click the Save and Close button.
  15. In this step we will add the new page and two child pages under news. If you already have created these pages from a previous exercise, don’t bother creating them again. Just skip to step 8
  16. On the ribbon, click the Add New Web Page button.
  17. Complete the following fields:
  18. Name: News
  19. Website: Basic Portal
  20. Parent Page: Home
  21. Partial Url: news
  22. Display Date: today’s date
  23. Page Template: Page
  24. Publishing State: Published
  25. Copy: This is the news page.
  26. Display Order: 10
  27. Click the Save and New button on the ribbon to save the record and open a new one.
  28. When the new dialog is displayed, complete the following fields:
  29. Name: News Article One
  30. Website: Basic Portal
  31. Parent Page: News
  32. Partial Url: article01
  33. Page Template: Page
  34. Publishing State: Published
  35. Copy: Lorem Ipsum
  36. Display Order: 1
  37. Click the Save and New button on the ribbon to save the record and open a new one.
  38. When the new dialog is displayed, complete the following fields:
  39. Name: News Article Two
  40. Website: Basic Portal
  41. Parent Page: News
  42. Partial Url: article02
  43. Page Template: Page
  44. Publishing State: Published
  45. Copy: Dolor
  46. Display Order: 2
  47. Click the Save and Close button on the ribbon to save the record and close the page.
  48. Click the Web Roles navigation link.
  49. On the Ribbon, click the Add New Web Role button.
  50. Complete the following fields:
  51. Name: News Editor
  52. Website: Basic Portal
  53. Authenticated Users Role: No
  54. On the Ribbon, click the Save button.
  55. Click on the Web Page Access Control navigation link.
  56. On the Ribbon, click the Add Existing Web Page Access Control button.
  57. When the “Look Up Records” dialog appears, click the New button.
  58. Complete the following fields:
  59. Name: View Statistics
  60. Website: Basic Portal
  61. Web Page: Statistics
  62. Right: Restrict Read
  63. Leave the remainder of the fields on the form at their default values for now
  64. On the Ribbon, Click the Save and Close button.
  65. Click OK on the Look up Records dialog
  66. On the Ribbon, click the Add Existing Web Page Access Control button.
  67. When the “Look Up Records” dialog appears, click the New button.
  68. Complete the following fields:
  69. Name: Grant News Change to News Editors
  70. Website: Basic Portal
  71. Web Page: News
  72. Right: Grant Change
  73. Leave the remainder of the fields on the form at their default values for now
  74. On the Ribbon, Click the Save and Close button
  75. Click OK
  76. Navigate to Contacts
  77. Click to Add an existing contact to this web role
  78. In the lookup Dialog, click New
  79. You may be in the new “metro-style” touch interface for CRM 2011. This view is currently incompatible with multiple forms, so we will turn it off for now. If you are already in classic view, ignore this step.
  80. Locate three small dots at the top left-hand side of the screen
  81. Click on them
  82. Choose Switch to classic view
  83. Navigate to the Portal Contact form and view the Web Authentication tab to view the fields created that associate this contact to the new portal user.
  84. Give the Contact the following fields:
  85. First name: Jon
  86. Last Name: doe
  87. Username: jdoe
  88. Reset Password To: pass@word1
  89. Logon Enabled: true
  90. Click Save & Close

VS 2012: