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:
- 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.
- 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.
- Enter a unique domain name for your trial (domainname.demo.adxstudio.com)
- Enter the CRM organization URL for your CRM Online trial
- Enter administrative username and password credentials.
- Agree to the terms of use and click the Create Demo button.
- Wait for an email that tells you that your environment has been configured.
- 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
- Navigate to community.adxstudio.com
- Click the download link to download the latest Portals .msi file.
- If you do not have an account, you will be asked to create one before you can download
- Install the .msi file, to the default location (Program Files(x86)
- Open IIS
- Click Add Website…
- Site Name: Basic Portal
- For Physical Path, browse to C:\Program Files(x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Samples\MasterPortal
- Set the Port number for the website or specify a specific host name, and click OK
- Ensure that the app pool for the portal is set to .NET framework version 4.0.
- Open VS 2012
- Open The AdxstudioPortals solution file found under C:\Program Files (x86)\ADXSTUDIO\XrmPortals\Samples
- Expand Master Portal
- Open web.config
- Modify the connection string to match your CRM online trial org’s URL, for example:
addname="Xrm"connectionString="ServiceUri=
- Open IE and browse to the websiteUsername=; Password=*********;"/>
- Open the web.config again
- Modify the <portals> node under <Microsoft.xrm.portal> (near the bottom of the file) so that the websiteName=“Basic Portal”
- Rebuild the web project.
- Open IE and browse to the website
Exercise 1b: Install License Key
- After you have downloaded the Adxstudio Portals solutions from Adxstudio.com, you will receive an email with a license key for a trial version.
- Open the attachment (which is an XML file).
- Copy the contents of the file to the clipboard.
- Open CRM and navigate to the Settings Page.
- Click on Adxstudio License Keys (under the Extensions group).
- On the Ribbon, click the new button.
- In the Name field, enter: License Key.
- Paste the contents of the XML file that you had earlier copied to the clipboard.
- 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.
- Navigate to C:\Program Files (x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Utilities
- Open WebsiteCopy.exe
- Select “XML File” as the source of the website you will be copying
- Click Next to select the name of the XML file you will be importing.
- Click Browse
- Navigate to C:\Program Files (x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Samples
- Choose Basic Portal.xml
- Click Next
- Click Next
- We now choose the destination of the websitecopy; make sure Microsoft Dynamics CRM server is selected.
- Click Next
- Enter your Discovery URL; to find this URL
- Open IE
- Navigate to the URL of the CRM trial you created in preparation for this training course and log in
- Navigate to Settings > Customizations > Developer resources > Service Endpoints
- Under Discovery Service you will find a URL; in Websitecopy.exe choose from the dropdown the URL that matches your discovery URL. For example
- Enter your credentials and click Next
- Click Connect
- Enter Imported Portal as the website name
- Click Next
- Click Create Website
In CRM
- Once the utility is finished, navigate to CRM and refresh
- Navigate to portals.
- Open Imported Portal
- 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.
- Click Web Page
- Open the Home page
- 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
- Open the web.config again
- Modify the <portals> node under <Microsoft.xrm.portal> (near the bottom of the file) so that the websiteName=“Imported Portal”
- Rebuild the web project.
- Open IE and browse to the website
- 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.
- 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:
- Open Internet Explorer and navigate to your CRM online trial org.
- Click the Portals area of the SiteMap (left-hand navigation).
- Click Websites.
- Click Basic Portal to open the Basic Portal website record.
- Select Web Pages.
- On the ribbon, click the Add New Web Page button.
- Complete the following fields:
- Name: News
- Website: Basic Portal
- Parent Page: Home
- Partial Url: news
- Display Date: today’s date
- Page Template: Page
- Publishing State: Published
- Copy: This is the news page.
- Display Order: 9
- Leave the remainder of the fields on the form at their default values for now.
- Click the Save and New button on the ribbon to save the record and open a new one.
- When the new dialog is displayed, complete the following fields:
- Name: News Article One
- Website: Basic Portal
- Parent Page: News
- Partial Url: article01
- Copy: Lorem Ipsum
- Display Order: 10
- Display Date: today’s date
- Page Template: Page
- Publishing State: Published
- Click the Save and New button on the ribbon to save the record and open a new one.
- When the new dialog is displayed, complete the following fields:
- Name: News Article Two
- Website: Basic Portal
- Parent Page: News
- Partial Url: article02
- Copy: Dolor
- Display Order: 11
- Display Date: today’s date
- Page Template: Page
- Publishing State: Published
- Click the Save and Close button on the ribbon to save the record and close the page.
- Select Web Link Sets.
- Open Primary Navigation.
- Click once on the Links grid on the form.
- Click the Add New Web Link button on the ribbon.
- Name: News
- Page: News
- Publishing State: Published
- Click Save & Close
In VS 2012:
- Refresh the Adxstudio cache by resetting the Basic Portal in IIS or Rebuilding the Basic Portal Project in VS 2012
- Navigate to the Basic Portal website in IE
- You will notice that News now appears on the primary navigation bar at the top of the page.
- Click on News
- 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:
- Navigate to Basic Portal
- Click Sign In in the upper right-hand corner.
- Sign in as administrator:
- Username: administrator
- Password: pass@word1
- Navigate to the Content page by clicking the link on the primary navigation.
- From the floating-menu, click the New button then select Child Page.
- Complete the following properties:
- Name:Example Content
- Copy: This is the Example Content page
- Leave the remainder of the properties at their default values.
- Click the Save button to save your changes.
- Move your mouse over the Primary Navigation and click the Edit button.
- Click the Add button (green plus).
- Complete the following properties:
- Name: Example Content
- Page: Example Content
- Click the Save button to save the new navigation link.
- Click the Save button to save your changes to the Primary Navigation.
- After the page reloads, you should see your new pages on the Primary Navigation bar.
- Navigate to Example Content page
- 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)
- 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
- Navigate to your Basic Portal website
- If you are signed in, sign out
- Click to Sign In
- 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.
- Create an account:
- Username: jdoe
- Password: pass@word1
- Question: Yes or No?
- Answer: Yes
- 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:
- First Name: Jon
- Last Name: Doe
- Email: [your email]
CRM:
- Navigate to Contacts via Workplace
- Note the contact that was created.
- Open up the contact
- 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.
- Locate three small dots at the top left-hand side of the screen
- Click on them
- Choose Switch to classic view
- 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.
- Navigate to Portals
- Open Basic Portal
- Navigate to Site Settings on the left-hand navigation pane
- Open the Authentication/Registration/Enabled Site Setting
- Set its value to “false”
Portal
- Rebuild your project in VS 2012
- Navigate to the Portal and go to the Sign In page
- 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:
- Navigate to Portals, Web Sites.
- Open Basic Portal.
- Click on the Web Pages navigation link on the left-hand side
- On the Ribbon, click on the Add New Web Page button.
- Complete the following fields:
- Name: Statistics
- Website: Basic Portal
- Parent Page: Home
- Partial Url: stats
- Display Date: today’s date
- Page Template: Page
- Publishing State: Published
- Copy: This is the statistics page.
- Display Order: 9
- On the Ribbon, Click the Save and Close button.
- 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
- On the ribbon, click the Add New Web Page button.
- Complete the following fields:
- Name: News
- Website: Basic Portal
- Parent Page: Home
- Partial Url: news
- Display Date: today’s date
- Page Template: Page
- Publishing State: Published
- Copy: This is the news page.
- Display Order: 10
- Click the Save and New button on the ribbon to save the record and open a new one.
- When the new dialog is displayed, complete the following fields:
- Name: News Article One
- Website: Basic Portal
- Parent Page: News
- Partial Url: article01
- Page Template: Page
- Publishing State: Published
- Copy: Lorem Ipsum
- Display Order: 1
- Click the Save and New button on the ribbon to save the record and open a new one.
- When the new dialog is displayed, complete the following fields:
- Name: News Article Two
- Website: Basic Portal
- Parent Page: News
- Partial Url: article02
- Page Template: Page
- Publishing State: Published
- Copy: Dolor
- Display Order: 2
- Click the Save and Close button on the ribbon to save the record and close the page.
- Click the Web Roles navigation link.
- On the Ribbon, click the Add New Web Role button.
- Complete the following fields:
- Name: News Editor
- Website: Basic Portal
- Authenticated Users Role: No
- On the Ribbon, click the Save button.
- Click on the Web Page Access Control navigation link.
- On the Ribbon, click the Add Existing Web Page Access Control button.
- When the “Look Up Records” dialog appears, click the New button.
- Complete the following fields:
- Name: View Statistics
- Website: Basic Portal
- Web Page: Statistics
- Right: Restrict Read
- Leave the remainder of the fields on the form at their default values for now
- On the Ribbon, Click the Save and Close button.
- Click OK on the Look up Records dialog
- On the Ribbon, click the Add Existing Web Page Access Control button.
- When the “Look Up Records” dialog appears, click the New button.
- Complete the following fields:
- Name: Grant News Change to News Editors
- Website: Basic Portal
- Web Page: News
- Right: Grant Change
- Leave the remainder of the fields on the form at their default values for now
- On the Ribbon, Click the Save and Close button
- Click OK
- Navigate to Contacts
- Click to Add an existing contact to this web role
- In the lookup Dialog, click New
- 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.
- Locate three small dots at the top left-hand side of the screen
- Click on them
- Choose Switch to classic view
- 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.
- Give the Contact the following fields:
- First name: Jon
- Last Name: doe
- Username: jdoe
- Reset Password To: pass@word1
- Logon Enabled: true
- Click Save & Close
VS 2012: