Sam's Microsoft Dynamics 365 Blog

Friday, 27 December 2019

Display Employee Directory (Delve/Corporate Directory) Inside SharePoint

In this article, we will discuss about displaying Employee Directory (Delve/Corporate Directory) in SharePoint.




So, let's discuss step by step: -

1. Open search site of SharePoint. e.g. https://tenant.sharepoint.com/search

2. Click on Gear Icon and select Site Settings.

3. Click on Site Collection Features.

4. Now enable (Activate): -
    a. SharePoint Server Publishing Infrastructure
    b. Search Server Web Parts and Templates
    c. SharePoint Server Standard Site Collection features


5. Again, open Site Settings and Click on Manage site features.


6. Now enable (Activate): -
    a. Search Config Data Content Types
    b. Search Config Template Feature
    c. SharePoint Server Publishing


7. Click on Site contents.


8. Click on Pages and create a new Welcome page.



9. Now Put a Title and select Page Layout as (Welcome Page) Search People and create it.


10. Open created page.


11. Click on Gear Icon and select the Edit page.



12. Click on dropdown icon inside People Search Core Results and select Edit Web Part.


13. Click on Change query inside Search Criteria inside Properties for Search Results.


14. Put below query inside the Query text box and Click on the Test query.

{searchboxquery} contentclass = spspeople

15. We can see the result inside SEARCH RESULT PREVIEW.


16. Now click on OK.

17. Select Use a single template to display items inside Display Templates inside Properties for Search Results.


18. Select People Item inside Item Display Template.

19. Now Apply and Save it, Then Check-in and Publish it.

  1. Here Now we can see the Employee Directory (Delve/ Corporate Directory).



Thanks for reading the article. Hope this Article will helpful for you. Cheers!!!


Thursday, 12 December 2019

Get Context in Add-in’s of Microsoft teams

In many Business scenarios, we have to create Add-ins for Microsoft Teams. Also, we need to define the Context in this Add-in.  So, in this article, we will discuss about getting Context in Microsoft Teams’ Custom Add-In.

So, let’s discuss Step by step: -

1. I have created a HTML page and adding a script reference of MicrosoftTeams.min.js. With the help of this Script reference, we can get a Context.

2. Now I have added a Script section in my HTML Code and added code for initializing the Context, as shown below.

<p> Hello World! </p>

<script src="https://statics.teams.microsoft.com/sdk/v1.4.2/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script>

<script>
var mycontext;
microsoftTeams.initialize();
microsoftTeams.getContext((context) => mycontext=(context))
console.log(mycontext)
</script>

3. Now I will deploy this code to my domain, and I will add domain URL to my Add-in JSON (manifest.json).

4. After that, I will import my Add-in Package to Microsoft Teams and then open the section where I have added this IFrame.

5. Now I can see in Console (In Chrome browser). Here it is printed a JSON of context. It will look as shown below.



Thanks for reading the article. Hope this Article will helpful for you. Cheers!!!


Web Resource vs PCF vs Canvas App - which of the one is used?

While started working on specific Business Requirements related to custom layout, there is a always common question that "where to star...