Developer Training Guide
Total Page:16
File Type:pdf, Size:1020Kb
Developer Training Guide
Lab Workbook Table of Contents 1. Chapter 1: Portals Overview
There are no true exercises for this chapter, but this is a good time to check out http://community.adxstudio.com
Familiarize yourself with the documentation, check out the forums, and begin planning your projects and potential projects that involve Adxstudio Portals. 2. 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: 3. Visit http://crm.dynamics.com 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. 4. Log into the Demo Builder website at https://demo.adxstudio.com 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. 5. Enter a unique domain name for your trial (domainname.demo.adxstudio.com) 6. Enter the CRM organization URL for your CRM Online trial 7. Enter administrative username and password credentials. 8. Agree to the terms of use and click the Create Demo button. 9. Wait for an email that tells you that your environment has been configured. 10. 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:
Exercise 1b: Install License Key
21. After you have downloaded the Adxstudio Portals solutions from Adxstudio.com, you will receive an email with a license key for a trial version. 22. Open the attachment (which is an XML file). 23. Copy the contents of the file to the clipboard. 24. Open CRM and navigate to the Settings Page. 25. Click on Adxstudio License Keys (under the Extensions group). 26. On the Ribbon, click the new button. 27. In the Name field, enter: License Key. 28. Paste the contents of the XML file that you had earlier copied to the clipboard. 29. 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 a. Open IE b. Navigate to the URL of the CRM trial you created in preparation for this training course and log in c. Navigate to Settings > Customizations > Developer resources > Service Endpoints d. Under Discovery Service you will find a URL; in Websitecopy.exe choose from the dropdown the URL that matches your discovery URL. For example https://disco.crm.dynamics.com/ 13. Enter your credentials and click Next 14. Click Connect 15. Enter Imported Portal as the website name 16. Click Next 17. Click Create Website In CRM
18. Once the utility is finished, navigate to CRM and refresh 19. Navigate to portals. 20. Open Imported Portal 21. 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. 22. Click Web Page 23. Open the Home page 24. 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
25. Open the web.config again 26. Modify the
Now we will switch back the portal to the standard portal for the remainder of the exercises.
30. Modify the
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. 12. Click the Portals area of the SiteMap (left-hand navigation). 13. Click Websites. 14. Click Basic Portal to open the Basic Portal website record. 15. Select Web Pages. 16. On the ribbon, click the Add New Web Page button. 17. Complete the following fields: a. Name: News b. Website: Basic Portal c. Parent Page: Home d. Partial Url: news e. Display Date: today’s date f. Page Template: Page g. Publishing State: Published h. Copy: This is the news page. i. Display Order: 9 j. Leave the remainder of the fields on the form at their default values for now. 18. Click the Save and New button on the ribbon to save the record and open a new one. 19. When the new dialog is displayed, complete the following fields: k. Name: News Article One l. Website: Basic Portal m. Parent Page: News n. Partial Url: article01 o. Copy: Lorem Ipsum p. Display Order: 10 q. Display Date: today’s date r. Page Template: Page s. Publishing State: Published 20. Click the Save and New button on the ribbon to save the record and open a new one. 21. When the new dialog is displayed, complete the following fields: t. Name: News Article Two u. Website: Basic Portal v. Parent Page: News w. Partial Url: article02 x. Copy: Dolor y. Display Order: 11 z. Display Date: today’s date aa. Page Template: Page ab. Publishing State: Published 22. Click the Save and Close button on the ribbon to save the record and close the page. 23. Select Web Link Sets. 24. Open Primary Navigation. 25. Click once on the Links grid on the form. 26. Click the Add New Web Link button on the ribbon. ac. Name: News ad. Page: News ae. Publishing State: Published af. Click Save & Close In VS 2012: 27. Refresh the Adxstudio cache by resetting the Basic Portal in IIS or Rebuilding the Basic Portal Project in VS 2012 28. Navigate to the Basic Portal website in IE 29. You will notice that News now appears on the primary navigation bar at the top of the page. 30. Click on News 31. Notice the Child links that appear. These are being generated by the “Page” Page Template. 32. 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: a. Username: administrator b. Password: pass@word1 4. Navigate to the Content page by clicking the link on the primary navigation. 5. From the floating-menu, click the New button then select Child Page. 33. Complete the following properties: ag. Name: Example Content ah. Copy: This is the Example Content page 34. Leave the remainder of the properties at their default values. 35. Click the Save button to save your changes. 36. Move your mouse over the Primary Navigation and click the Edit button. 37. Click the Add button (green plus). 38. Complete the following properties: ai. Name: Example Content aj. Page: Example Content 39. Click the Save button to save the new navigation link. 40. Click the Save button to save your changes to the Primary Navigation. 41. After the page reloads, you should see your new pages on the Primary Navigation bar. 42. Navigate to Example Content page 43. 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) 44. 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. 45. 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: a. Username: jdoe b. Password: pass@word1 c. Question: Yes or No? d. Answer: Yes 6. 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: a. First Name: Jon b. Last Name: Doe c. 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. a. Locate three small dots at the top left-hand side of the screen b. Click on them c. Choose Switch to classic view 5. 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. 6. Navigate to Portals 7. Open Basic Portal 8. Navigate to Site Settings on the left-hand navigation pane 9. Open the Authentication/Registration/Enabled Site Setting 10. Set its value to “false”
Portal 11. Rebuild your project in VS 2012 12. Navigate to the Portal and go to the Sign In page 13. 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 ../../RequiresInvitation Site 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. 2. Open Basic Portal. 3. Click on the Web Pages navigation link on the left-hand side 4. On the Ribbon, click on the Add New Web Page button. 5. Complete the following fields: a. Name: Statistics b. Website: Basic Portal c. Parent Page: Home d. Partial Url: stats e. Display Date: today’s date f. Page Template: Page g. Publishing State: Published h. Copy: This is the statistics page. i. Display Order: 9 6. On the Ribbon, Click the Save and Close button. 7. 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 a. On the ribbon, click the Add New Web Page button. b. Complete the following fields: b.i. Name: News b.ii. Website: Basic Portal b.iii. Parent Page: Home b.iv. Partial Url: news b.v. Display Date: today’s date b.vi. Page Template: Page b.vii. Publishing State: Published b.viii. Copy: This is the news page. b.ix. Display Order: 10 c. Click the Save and New button on the ribbon to save the record and open a new one. d. When the new dialog is displayed, complete the following fields: d.i. Name: News Article One d.ii. Website: Basic Portal d.iii. Parent Page: News d.iv. Partial Url: article01 d.v. Page Template: Page d.vi. Publishing State: Published d.vii. Copy: Lorem Ipsum d.viii. Display Order: 1 e. Click the Save and New button on the ribbon to save the record and open a new one. f. When the new dialog is displayed, complete the following fields: f.i. Name: News Article Two f.ii. Website: Basic Portal f.iii. Parent Page: News f.iv. Partial Url: article02 f.v. Page Template: Page f.vi. Publishing State: Published f.vii. Copy: Dolor f.viii. Display Order: 2 g. Click the Save and Close button on the ribbon to save the record and close the page. 8. Click the Web Roles navigation link. 9. On the Ribbon, click the Add New Web Role button. 10. Complete the following fields: a. Name: News Editor b. Website: Basic Portal c. Authenticated Users Role: No 11. On the Ribbon, click the Save button. 12. Click on the Web Page Access Control navigation link. 13. On the Ribbon, click the Add Existing Web Page Access Control button. 14. When the “Look Up Records” dialog appears, click the New button. 15. Complete the following fields: a. Name: View Statistics b. Website: Basic Portal c. Web Page: Statistics d. Right: Restrict Read e. Leave the remainder of the fields on the form at their default values for now 16. On the Ribbon, Click the Save and Close button. 17. Click OK on the Look up Records dialog 18. On the Ribbon, click the Add Existing Web Page Access Control button. 19. When the “Look Up Records” dialog appears, click the New button. 20. Complete the following fields: a. Name: Grant News Change to News Editors b. Website: Basic Portal c. Web Page: News d. Right: Grant Change e. Leave the remainder of the fields on the form at their default values for now 21. On the Ribbon, Click the Save and Close button 22. Click OK 23. Navigate to Contacts 24. Click to Add an existing contact to this web role 25. In the lookup Dialog, click New 26. 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. a. Locate three small dots at the top left-hand side of the screen b. Click on them c. Choose Switch to classic view 27. 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. 28. Give the Contact the following fields: a. First name: Jon b. Last Name: doe c. Username: jdoe d. Reset Password To: pass@word1 e. Logon Enabled: true 29. Click Save & Close VS 2012: 30. Rebuild the MasterPortal project 31. Navigate to the Basic Portal in IE 32. Navigate to the URL for the statistics page: http://mywebsite/stats 33. Notice you do not have read access to the page 34. Login as Jon Doe: jdoe; pass@word1 35. Navigate again to the statistics page 36. Notice you have access 37. Navigate to the News page 38. Notice you may edit the content on this page 39. Navigate to News Article 1 40. Notice you also have access to this page 46. Chapter 6: Community Features
Exercise 1: Add a Forum
Configure the Community Portal 1. Open VS 2012 2. Open The AdxstudioPortals solution file found under C:\Program Files (x86)\ADXSTUDIO\XrmPortals\6.x.xxxx\Samples 3. Expand Master Portal 4. Open web.config 5. Modify the connection string to match your CRM online trial org’s URL, for example:
Add a Forum 11. Navigate to the CRM 12. Click the Portals area of the SiteMap (left-hand navigation). 13. Click Websites. 14. Click Community Portal to open the Community Portal website record. 15. Click Forums on the left-hand nav bar 16. Click to Add a New Forum 17. Give it the following attributes: a. Name: Example Forum b. Website: Community Portal c. Parent Page: Forums d. Partial URL: example-forum e. Publishing State: Published f. Forum Page Template: Forum g. Thread Page Template: Forum Thread 18. Save & Close In VS 2012 19. Rebuild the Project 20. Navigate to the Community Portal 21. Navigate to Forums 22. Notice that the new example forum you have created is visible 23. Click to view the forum. Note that because there are no forum threads, the only option at this point is to create a new thread. Exercise 2: Add a Forum Thread
1. Navigate to the Community Portal 2. Log in as administrator a. Username: administrator b. Password: pass@word1 3. Navigate to a Forum (For example, the Example Forum you created in the last exercise) 4. Navigate to the “Create a New Thread” section of the page 5. Fill in the required fields to add a new forum thread a. Thread Title: Question about Forums b. Type: Question c. Content: “I have a question about forums, can someone help me?” 6. Click the Create this Thread button 7. You will be taken to the new thread you have created 8. Post a reply: Type “Yes” in the Content box and click Post this Reply 9. Navigate to the Support Forum page by clicking the link in the breadcrumbs 10. Notice the thread you created: Notice it is a question (indicated by the question mark icon) and that it has one reply 11. Navigate back into the thread 12. Click the Mark as answer button next to the response you just posted 13. If you navigate back to the Support Forum page, you will notice the thread is now marked as answered 14. Navigate back into the thread. 15. Click Edit on the toolbar at the upper right-hand corner of your browser 16. Check “Sticky?” 17. Click Save 18. Navigate to the Support Forum page by clicking the link in the breadcrumbs 19. Notice the thread is Sticky now. Exercise 3: Add an Idea Forum
CRM 1. Navigate to the CRM 2. Click the Portals area of the SiteMap (left-hand navigation). 3. Click Websites. 4. Click Community Portal to open the Community Portal website record. 5. Click Idea Forums on the left-hand navigation area 6. Click to Add a New Idea Forum 7. Give the Idea Forum the Following values: a. Title: Example Idea Forum b. Website: Community Portal c. Partial URL: example-idea-forum d. Type of Voting: Rating e. Maximum Rating: 5 8. Click Save & Close In VS 2012 9. Rebuild the Project 10. Navigate to the Community Portal 11. Click on Ideas on the primary navigation bar 12. Notice that the new Example Idea Forum you have created is visible Exercise 4: Add an Idea
1. Navigate to the Community Portal website 2. Sign in as Administrator if you are not already signed in. 3. Click on Ideas on the primary navigation bar 4. Open the Example Idea Forum we create in the previous exercise 5. Navigate to the Suggest a New Idea part of the page 6. In the Idea textbox, type “Example Idea” 7. For the Description, type “Lorem Ipsum” 8. Click Submit Idea 9. Note that your Idea appears 10. You may up-vote your Idea by clicking on the Up-pointing arrow button to the left of the idea. 11. You may assign a score to the idea. Try clicking +3 12. The Idea will now have a rating of 4.
Experiment: Sign out of the portal. You are now anonymous. Navigate back to that same idea as before? Can you vote on it? Comment on it? Why? Try playing around with different Idea settings to get different effects in terms for how Ideas can be voted on. Exercise 5: Add a Blog
14. Navigate to the CRM 15. Click the Portals area of the SiteMap (left-hand navigation). 16. Click Websites. 17. Click Community Portal to open the Community Portal website record. 18. Click Blogs on the left-hand navigation area 19. Click to Add a New Blog 20. Give the Blog the Following values: a. Name: My Own Little Blog b. Website: Community Portal c. Parent Page: Blogs d. Partial Url: little-blog e. Home Template: Blog f. Post Template: Blog Post g. Archive Template: Blog Search h. Summary: “This is my Own Little Blog” i. Comment Policy: Open 21. Click Save 22. Click on Author Roles on the left-hand side of the Blog form window 23. Click to Add Existing Role 24. Add the Administrators role related to the Community Portal Website. 25. Click OK 26. Save & Close the Blog In VS 2012 27. Rebuild the Project 28. Navigate to the Community Portal 29. Click on Blogs on the primary navigation bar 30. Notice that the new Blog you have created is visible – a Link to it shows up on the right-hand sidebar. Exercise 6: Add a Blog Post
1. Navigate to the Community Portal website 2. Sign in as Administrator if you are not already signed in. 3. Click on Blogs on the primary navigation bar 4. Open the Blog we create in the previous exercise (My Own Little Blog) by clicking on the link on the right-hand sidebar 5. Click New > Blog Post on the toolbox in the upper-right hand corner of the browser 6. Name the Blog Post “This is my First Post” and enter in something funny or interesting in the Copy section. 7. Give the Blog Post a partial URL of first-post and Click Save 8. You Blog Post is now up on the portal.
Experiment: Try commenting on the Blog post both as yourself and as anonymous users. How do you enable Ratings for the Blog post? How to blog posts get aggregated? Play with the options and let the instructor know if you have any questions. 47. Chapter 7: Portal Theming
Exercise 1: Edit the Copy of a Page Using Bootstrap Elements
1. Navigate to the Basic Portal Website 2. Login as Administrator if you are not already logged in. 3. Navigate to Content > Content Page 4. Edit the Copy using front-side editing 5. The tinyMCE editor will appear Let’s play with a new simple styles that we can attach to elements: 6. Beneath the current content block, type a sentence “This is a sentence” 7. Follow this with a few paragraph breaks by hitting enter on your keyboard several times 8. Highlight the sentence and from the Styles dropdown select “Alert Info” 9. Save 10. Notice that the sentence you added is surrounded by an alert box 11. Click to edit the content block again. 12. Place your text cursor beneath the alert block you added 13. Insert a table by clicking the insert table button, which is on the bottom row of buttons, all the way to the left-hand side (two down from the save button) 14. Choose 3 rows and 3 columns 15. Place some dummy content spread throughout the table 16. Save 17. Notice how the table looks 18. Click to edit the content block again. 19. Select the table 20. Click to Insert and Attribute by clicking the button just left of the Format Dropdown 21. Click the Class dropdown and select table (begin typing the word to have the dropdown find it for you) 22. Save 23. Notice how the table looks 24. Click to edit the content block again. 25. Now Edit the Markup by clicking the html button 26. Find the