Showing posts with label noreply@blogger.com (Johnathan Horton). Show all posts
Showing posts with label noreply@blogger.com (Johnathan Horton). Show all posts

Thursday, November 8, 2018

Create Nested Sub-site With ChangeBot

Create Nested Sub-site With ChangeBot (Relative URL)


We always recommend you create a site collection for every extranet site you create. There are many reasons why this is the preferred method, however, some of our customers have found that multiple levels of sub-sites are best for their environment. These customers still want to use ChangeBot to automatically create sites, add users, and other general maintenance items on these nested sub-sites but run into an issue with how to populate the URL. Do you allow your users to manually enter it and possible have a typo?

Below are the steps for setting up your ChangeBot Request Profile so that you can successfully build your Relative URL and provision a site at a subsite level. In the steps below, we have two variables that can be populated with a drop down box (Inputs.Subsite and Inputs.SiteTitle) and the key to making it work correctly is in Step 10... using $inputs.Subsite/$Inputs.SiteTitle to define our Subsite and sub-subsite title to form the URL.


Example Usage:





  1. Create an Input Property cooresponding to the subsite name
  2. Generate site collection property output through Create Site Collection Activity
  3. Create a new activity in the execution plan of your request profile
  4. Set the Activity Type to Create Site
  5. Click the function button next to the Site Collection box
  6. Click the Property Group drop down and select Execution Properties
  7. Click the Property drop down and select the Properties.[SiteCollectionProperty] that was previously defined
  8. Click OK
  9. Click the the editor button next to the Relative URL box (this variable will be added after the site collection name in the URL)
  10. Define the Relative URL using a combination of text and variable input properties (i.e. $inputs.Subsite/$Inputs.SiteTitle)
  11. Click Save
  12. Click the editor box next to Title
  13. Define the title using a combination of text and variable input properties (i.e. "Text" $Inputs.SiteName)
  14. Click Save
  15. Click the editor button next to the Description box
  16. Specify the description using a combination of text and variable input properties (i.e. "Text" $Inputs.SiteName "Text")
  17. Click Save
  18. Click the function button next to the Locale Id box
  19. Click the Property Group drop down and select Global Properties
  20. Click the Property drop down and select System.Locale.English.US.ID


     
    English is the only Locale Id available by default.  You must install language packs and manually add additional global properties to make them available
  21. Click OK
  22. Click the function button next to the Site Definition box
  23. Click the Property Group drop down and select Global Properties
  24. Click the Property drop down and select the desired Site Definition (i.e. Sharepoint.SiteDefinitions.TeamSite)
  25. Click OK
  26. Click the function button next to the Use Unique Permissions box
  27. Click the Property Group drop down and select Global Properties
  28. Click the Property drop down and select True to break permission inheritance or False to inherit permissions
  29. Click OK
  30. For the Site output box, specify an Output variable that can be used for other steps in the Activity Plan

  31. Click Save
After following all the above steps, you should now be able to populate the relative URL with a path to provision your sub-site within a sub-site.


    by noreply@blogger.com (Johnathan Horton) via SharePoint Solutions Blog

    Wednesday, November 7, 2018

    Redirection Receiver-Choose a Picture Dependant on Registration Response


    Let’s say we wanted to add an image to a User’s profile to quickly identify them as a member of an external customers’ organization. Perhaps you work with multiple vendors and you want to add their logo to the user’s profile. Following the below steps will allow you to add a photo to an external user based on selecting an answer from a drop down list on the registration page.
    The first step we need to do if you have not already, is to add the picture column to the Hidden user information list for the site collection in question. We are working in the root site collection, which we suggest all users have access to, so you only have to do this step on the root site collection. If however, you do not allow users access to the root site collection, then this step will need to be repeated on all site collections you want to view a users’ picture on.
    Navigate to <sitecollectionurl>/_layouts/15/people.aspx?MembershipGroupId=0. now, you will see 2 new menus.



    Click Settings and choose List Settings


    Now you will be taken to List Settings page of UIL which was not available with /_catalogs/users/xxxxx.aspx option.


    Scroll down and click any view that you want to be modified. In this case, I will chose detail view, then select the “picture” field to be shown in the view.





     Now that the list is set correctly, create a SharePoint document library to hold the pictures. I have named mine VendorImages.
    Upload images with correct naming convention “+imagename+” The plus signs must be added to the front and last of the name. See below image for example


    Next, we need to create the new entry on the registration form;
    Since I want to capture the Vendor name, I will create a “Vendor Name” drop down menu to from which to choose 




    Next, Create a registration receiver to build the Picture URL based on registration answer.
    Open the web.config file for your desired web application and add your registration receiver in the <registrationReceivers> tag




    Below is the text that we used to choose the path based on which answer was given to the Vendor. *NOTE* my images were .png files so this line is looking for the answer (Value) for the Vendor registration field and adding the .png to the file.
    <add name="SPPicture" spUserFieldMap="Picture=/VendorImages/+$registrationItem.Fieldanswers.get_Item('Vendor').value+.png" type="SPSolutions.SharePoint.ExCM.ExtranetSPUserRegistrationReceiver, SPSolutions.SharePoint.ExCM, Version=3.0.0.0, Culture=neutral, PublicKeyToken=fdcedad4c93ea981" />

    Now that the registration receiver is in place, I will register two users with different vendor names

     And browse out to the Hidden User Information List (accessed by navigating to /_catalogs/users/simple.aspx or  /_catalogs/users/detail.aspx) or going out to people and groups.


    Now you can see that the correct image was chosen based on which answer was given to the "Vendor" question at registration.

    by noreply@blogger.com (Johnathan Horton) via SharePoint Solutions Blog

    Tuesday, October 2, 2018

    Using a Registration Receiver to Map User Data



    Registration Receiver

    One of the first things that I do when I get something new is make it uniquely my own. When I got my new desk, I broke out the drill and installed a USB Hub. New car… seat covers and dice for my mirror. New house… paint every room in the house (ok, so that one was actually my wife’s choice) but I think there is something about customizing or personalizing that makes the experience feel special and unique in some way. Your SharePoint extranet powered by ExCM should be no different!

    AD vs. HUIL

    Most people who have worked with SharePoint for a while know that Active Directory is the default location that is used to pull user information from. What some do not know is that there is another list that can be populated by AD called the User Information List, or sometimes called the Hidden User Information List. Typically this list is kept in Sync with Active Directory by the User Profile Service taking data from AD and adding it to the HUIL. In this article we will walk you though how to use this HUIL to store data about your external users. To access your HUIL, just browse out to;



    SP User Registration

    When an internal user logs into a site collection, their First and Last Name is displayed in the top right corner. This information is stored in Active Directory. However, your Forms Based Users are not stored in AD and therefore their user name is typically just their email address. We created the SPUser Registration Receiver to help personalize the experience for your external user and add their first and last name to the user information. The following code is used to accomplish this for us.

    <add name="SPUser"

    spUserFieldMap="Title=$registrationItem.FieldAnswers.get_Item('FirstName').Value $registrationItem.FieldAnswers.get_Item('LastName').Value;" type="SPSolutions.SharePoint.ExCM.ExtranetSPUserRegistrationReceiver, SPSolutions.SharePoint.ExCM, Version=3.0.0.0, Culture=neutral, PublicKeyToken=fdcedad4c93ea981" />



    Assign a Department (built In)

    Now that we know about the HUIL and have seen a registration receiver in action, let’s work through setting up our own registration receiver. For this example, we are going to add a new registration field and allow our end user to assign a department from a drop down list.

    First, let’s create the registration field by adding a global registration field through the Global Application Settings ExCM menu. We could also create a registration field on an individual site collection, in case you have one site collection that you need to collect different information than the rest of your site collections

    [Steps to add a drop down list to a registration page] 






    Now that the field is there, let’s test to ensure that we did not break anything. We browse out to the site and register as sally in the accounting department.

    Now that she is registered we browse out to the HUIL and see that she is added but the department did not show up. 






    To correct this, we now need to add some logic to our web.config file so that we map the answer to the “department” registration field to the department field in the HUIL

    [steps to add department registration receiver]

    Open the Web App’s web.config file by browsing out to the Virtual Directory (in our case C:\inetpub\wwwroot\wss\VirtualDirectories\extranet.awbikes.com80)

    Make a backup copy of the web.config file

    Search for <registrationReceivers>

    Copy the following text and paste just above SPUser line

    <add name="SPDepartment" spUserFieldMap="Department=$registrationItem.FieldAnswers.get_Item('Department').Value;" type="SPSolutions.SharePoint.ExCM.ExtranetSPUserRegistrationReceiver, SPSolutions.SharePoint.ExCM, Version=3.0.0.0, Culture=neutral, PublicKeyToken=fdcedad4c93ea981" />

    Save your web.config file.


    Now that we have the Department registration receiver in place, lets create a new user and test. We browse out to the site and register as Tom from the Accounting department



    We can see that the user was created and now has the appropriate department listed as chosen by the drop down box on the registration page


    Be sure to check out our next post on how to take this a step further and assign a photo based on registration answer

    by noreply@blogger.com (Johnathan Horton) via SharePoint Solutions Blog