Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
$9.99 | ALL EBOOKS & VIDEOS
Save more on purchases! Buy 2 and save 10%, Buy 3 and save 15%, Buy 5 and save 20%
Dynamics 365 Application Development
Dynamics 365 Application Development

Dynamics 365 Application Development: Master professional-level CRM application development for Microsoft Dynamics 365

By Deepesh Somani , Nishant Rana
$43.99 $9.99
Book Jan 2018 418 pages 1st Edition
eBook
$43.99 $9.99
Print
$54.99
Subscription
$15.99 Monthly
eBook
$43.99 $9.99
Print
$54.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now
Table of content icon View table of contents Preview book icon Preview Book

Dynamics 365 Application Development

Chapter 1. Customize Application Navigation

A site map can be defined as a set of links through which a user can navigate and find their way around the website. In Dynamics 365 and in its earlier version, a site map is an XML file that is used for defining the navigation of the application or specific app module for the users. Until CRM 2016, there had been only one site map file for an organization. With the advent of apps in Dynamics 365, now we have one site map file for each of the app modules. As far as customizing the site map was concerned, until now we had to either update it using XML Editor, a text editor or some third-party tools. However, with Microsoft Dynamics 365 we have the built-in Site Map Designer in the product itself. This designer allows the administrator, customizers, or users with appropriate privileges to easily define navigation for an app by simply adding, dragging, and dropping the components within the Site Map Designer canvas. In this chapter, we will be covering the following points:

  • Overview of the site map in Dynamics 365
  • Understanding the designer interface and its components—areas, group, and sub areas
  • Common operations that can be performed on the site map

Overview of the site map


For every app that is configured, we will have a separate site map defined for it. By default, we will have a Dynamics 365 custom app configured during the set up of the Dynamics 365. We can also have other apps configured while provisioning the Dynamics 365 instance such as Sales, Field service, Project service automation, or Customer service, if we have opted for them while provisioning Dynamics 365. For now, let's try to understand the basics of using the Site Map Designer using Dynamics 365 for a Sales app. Suppose we have selected Sales while provisioning Microsoft Dynamics 365, shown as follows:

Note

The link for the Dynamics 365 Trial with Enterprise Plan 1 can be found here: https://signup.microsoft.com/Signup?OfferId=bd569279-37f5-4f5c-99d0-425873bb9a4b&dl=DYN365_ENTERPRISE_PLAN1.

This will provision Dynamics 365 with a Sales app. This is how the navigation will look for the Sales app:

Now, as we have covered the basics of site map, let us look at the Site Map Designer interface and what components it has and how we can use it to update our site map for sales.

Overview of Site Map Designer

To access the Site Map Designer for our Sales app, perform the following steps:

  1. Log in to the Dynamics 365 Sales app with a user having System Customizer, System Administrator, or any appropriate security role to customize the site map.
  2. Go to SettingsSolutions.
  3. Create a new solution with the appropriate details. For example, we have created a solution with the name of Site Map Solution, the publisher as default publisher, and the version as 1.0.0.0.

Note

We can also log in to the default Dynamics 365 - custom app and create a new solution and add the Sales App Site Map in it.

  1. Click on Client Extensions and add Sales App Site Map in it, shown as follows:

Note

We can go to Settings | Customizations and update the site map in the default solution as well. However, as a best practice, we should create a separate solution and add the required components that need to be customized in it.

Double-clicking on it will open the Sales App Site Map on the Site Map Designer for us to edit. The Site Map Designer canvas allows us to work with Area, Group, and Subarea components:

Within the designer canvas, we can Add, Cut, Copy, Paste, Clone, and Delete.

Let us look at these components in detail.

Understanding components in the site map

Site map consists of three main components:

  • Area: Area can be defined as the main node or area inside the navigation pane that consists of groups and their corresponding subarea. A new area can be added or the existing area can be updated or deleted. If an area doesn't consist of any visible subarea, the area will be hidden.
  • Group: Groups can be defined as a collection or group of subareas. Just like an area, a new group can be added or an existing group can be updated or deleted.
  • Subarea: A subarea can be defined as a navigation link within the area that defines what should load inside CRM's main pane when clicked. The subarea can point to a dashboard, an entity, a URL, or a web resource. Just like area and group, a new subarea can be added and an existing subarea can be updated or deleted.

Referring to our Sales app interface:

  • Sales, Marketing, Settings, and Training are termed as areas
  • My Work, Customers, Sales, Collateral, Marketing, Goals, and Tools are groups within the Sales area
  • Dashboards, What's New, and Activities are subareas inside the My Work group.

The Sales area would have subareas specific to Sales, arranged inside what are termed as groups. Similarly, the Marketing, Settings and Training Area will have corresponding subareas inside the corresponding group. As shown in the following screenshot, the Marketing Area has Dashboards, Activities, Accounts, Contacts, Leads, Marketing Lists, Campaigns, Quick Campaigns, and so on. It also has subareas specific to the marketing module. These subareas are arranged inside the My Work, Customers, Marketing, Collateral, and Tools groups:

Now, as we have got the overview of the site map components, let us look at the different properties of each of these components in the next section.

Getting to know the area, group, and subarea properties

Let us look at the different properties of these components before we start customizing our Sales app navigation.

  • The area component comprises of following properties:
  • Group component shares most of the same properties as Area:

Note

Set as Profile property of Group might not be relevant for Dynamics 365, as the Workplace area has been discontinued starting CRM 2013.

Subarea has few more properties compared to Area and Group:

  • As we know that the site map is basically an XML file, any changes that we are doing through Site Map Designer are basically updating the site map's XML behind the scenes:
  • To get the Sales App Site Map definition, export the solution containing the Sales App Site Map client extension and unzip it. Then, open the customizations.xml file and search for the SiteMap tag.
  • The following is the sample XML for the My Work group of the Sales area inside the Sales App Site Map. We can see the Area, Group, and SubArea tags along with their corresponding attributes:
  • As mentioned earlier, instead of using the Site Map Designer, we can manually update the site map's XML using any text editor, and can import back the solution (and publish it) to see the changes.

In this section, we looked at the properties of the area, group, and subarea components of Site Map Designer. In the next section, we will learn how to perform some basic operations such as updating, adding, deleting, and so on, on these components through Site Map Designer.

Common operations using Site Map Designer


Now, as we have gone through all the properties of the components of site map in detail, let us see how we can perform some common operations using Site Map Designer.

Editing an existing component in the site map

To edit an existing area, group, and subarea in the site map, we need to select that component in the designer and go to the properties tab of that component. Let us take a simple example to understand this. Suppose we want to rename the existing Training area to Help, we need to select the Training area on the site map, go to its Properties tab, and update its Title property.

Let us specify Help as the value for the Title property. This updates the area's title from Training to Help, as shown as follows:

We can also update the title property of the site map components through inline editing. For this, hover over the component to reveal the pencil. We can click on the pencil icon to edit the Title. Similarly, we can edit or update the corresponding properties of the group and subarea components, and as we mentioned earlier, any changes made in the designer will reflect back in the XML for the site map.

Adding a component to the site map

To add an area, group, or subarea to the site map, we need to click on the Add button on the Action Bar in the Sitemap Designer. Let's add an area here to understand this. Click on the Add button and select Area:

Or, drag-and-drop the Area from the Components tab.

Once added, we need to select the component (Area here), and then edit its properties in the Properties tab. For example, the Properties tab for the new Area component added is shown in the following image:

This will add a new Area named New Area in the site map.

Similarly, we can add or drag and drop new groups and subarea components in the Navigation and specify their properties.

Cutting, copying, and pasting a component to the site map

Through Site Map Designer, we can also cut, copy, and paste site map components. Let's select our New Area and click on the Cut button on the Action Bar to cut the component. The component will be grayed out.

Similarly, we can select the component and click on the Copy button to copy the component. The Paste button gives us the option of pasting the component to the right or left in case of Area and Group components, shown as follows:

Cloning a component to the site map

To clone or make a copy of an existing Area, Group, and Subarea to the site map, we can select the component and click the Clone button on the Action Bar in the Sitemap Designer. The clone will add the respective component to the next component being cloned with the -Copy suffix added to its Title. For example, cloning the Sales Area, as shown in the following image, will add a new area named Sales-Copy next to the Sales Area that is cloned:

Deleting a component from the site map

To delete an Area, Group, or Subarea from the site map, select the component and either click Delete from the Action bar or press the Delete key:

Deleting an Area will also delete the Group and Subarea in it. Similarly, deleting the Group will delete the Subarea in it.

Organizing a component within the site map

Using Drag and Drop, we can move the components around the site map before we rearrange it:

For example, we can move the Sales Area to be the last Area in the site map, My Work to be the second group within the Sales Area, Dashboard as the last Subarea inside the MyWork Group, and so on, shown as follows:

We can also move a Subarea to a different Group. For example, the Dashboards Subarea can be moved to any of the other Groups such as Customer, Sales, Collateral, and so on, and a Group to be part of a different Area. That is, we can move the My Work Group to be part of the Settings, Training, and Sales area.

Saving, validating, and publishing changes in the site map

To reflect any of the preceding changes for the users, such as add, clone, delete, and so on, we need to click Save and then Publish it in the Site Map Designer canvas. Here, *Draft indicates that there are unsaved changes:

On saving the changes and clicking on Publish, it changes to Published to indicate that changes have been applied and are available for the users to see:

Clicking on the Save button will also validate and show up if there are any errors in the site map. For example, if we have not provided values for any of the required fields or specified unallowed characters for any of the properties. In the following screenshot, we have not provided a value for the entity property in the Subarea and clicked on Save, which is a mandatory field:

This shows the ERROR MESSAGE notification in the designer with all the details. We will only be able to save and then publish the changes after fixing the error.

Adding a Subarea component in the site map

Let's take a simple scenario here to understand how we can add a new Subarea component. We realize that our Sales app users would be frequently accessing the Open Leads View inside CRM, so it would be helpful for them if we could add a Subarea for Open Leads View in the My Work Group in the Sales Area for them. To implement it, we will need to add a new Subarea inside the My Work Group of type URL. To do so, we need to click on Add in the Action bar in Sitemap Designer and add a new Subarea and drag and place it below the Activities SubArea in the My Work Group:

Here, the URL pattern for the view needs to be the following:

=/_root/homepage.aspx?etc=<entity code >&viewid=%7b<GUID value of view id>%7d"

For the etc and viewid query parameters, we need to go to the Open Leads view in CRM and click on the EMAIL A LINK| Of Current View ribbon button to get the link:

The link will have the value of etc and viewid. We will then copy the value of the etc and viewid query string parameters from the link. We can then set the properties for our new SUB AREA, shown as follows:

We will save and then publish it. After publishing, inside the Sales app the user will be able to see the new Subarea named Open Leads:

Clicking on the Open Leads Subarea will open the Open Leads view, shown as follows:

Hiding a Subarea component in the site map

As we saw earlier, the Subarea component has a privilege property. It defines whether to show or hide the Subarea based on privileges the user has through the security roles assigned. Let us try to understand this with an example as well. Suppose we want to show the Open Leads Subarea we just added to only those users who have a Create privilege on the Lead entity. To define this, let us go back to the Properties tab of the Open Leads Subarea in Site Map Designer. There, we need to go to Privileges inside the Advanced section. Inside the Entity drop-down, we can select the Lead entity and click on the + (plus) button to add the record. We will leave all the checkboxes unchecked, except Create:

Save and publish the changes. Now, let us log in with the user that has only the Salesperson security role assigned. Here, we have updated the security role and have set None for Create Privilege on Lead Entity; that is, the first option that we see in the following screenshot:

The users who do not have the Create privilege on the Lead record, will not be able to see the Open Leads Subarea in their site map. 

Passing parameters to a URL from the site map

As we saw earlier, the Subarea component has a Parameter Passing checkbox property. It specifies whether to pass information about the organization and language context to the URL. The property is only available for Subareas of type web resource or URL. Suppose we have the following URL defined in our URL property of Subarea:http://mydomain/mypage.aspx.Checking the Parameter Passing checkbox will pass the following parameters to it:http://mydomain/mypage.aspx/?orglcid=1033&orgname=org29d341dd&userlcid=1033.

  • orglcid: language code identifier of the base language of the organization
  • orgname : unique name of the organization
  • userlcid: language code identifier used by the current user

This information could be used to create solutions that support multiple languages.

Note

Creating solutions that support multiple languages is detailed at https://msdn.microsoft.com/en-us/library/hh670609.aspx#Anchor_0.

Editing the site map and support for clients


Let us look briefly at separate ways of editing the site map apart from Site Map designer and the ways in which clients are supported for the different type of site map that we now have in Dynamics 365.

Site map editors

A site map, as we essentially know, is an XML file. Any XML text editor is good enough to edit site map XML files. For this, we can export the unmanaged solution that contains the site map XML, edit it either in NotePad, Visual Studio, or any other XML editor, and import it back. The important thing to remember here is, if we are importing the site map as a managed solution, it will create a new site map record with all the latest changes, and in the case of unmanaged, the existing site map XML is overwritten.

Note

Editing the site map XML with schema validation is detailed at https://msdn.microsoft.com/en-us/library/gg334493(v=crm.8).aspx.

Apart from Site Map Designer, we can use one of the third-party site map editors to edit the site map. One of the most popular tools is site map editor that is included as part of the XRM Tool Box. This is how our Sales App Site Map loads up inside site map editor:

The tool makes it easy to edit the site map compared to editing the XML manually. The tool has been one of the most popular tools for editing site maps and has been available since CRM 2011. The tool has been recently updated to support multiple site maps available in Dynamics 365. The other option is programmatically updating the site map. For this, we can make use of the site map entity and update its sitemapxml property, shown as follows:

  • Create an object of the site map entity:
Entity siteMap = new Entity["sitemap"]; 
  • Update its sitemapxml property with valid XML:
siteMap["sitemapxml"] = "valid site map xml"; 
  • Update the entity using Organization Service's instance:
service.Update(siteMap); 
  • Publish the changes using the PublishXmlRequest class:
PublishXmlRequest request = new PublishXmlRequest();
 request.ParameterXml = "<importexportxml><sitemaps><sitemap></sitemap></sitemaps></importexportxml>";
 service.Execute(request);

We can also create and delete app-specific site map records programmatically. However, it is recommended you use Site Map Designer instead of doing it programmatically. Another point to note is that the default site map record cannot be created or deleted.

Note

It is strongly recommended that we export the existing site map XML file and save a copy of it before we start editing, which can help us to restore it back in case of any errors while editing.

Supported clients

The default site map, which is the site map for Dynamics 365 – custom app is supported for both Dynamics 365 web applications and Dynamics 365 for Outlook. The site maps for any new custom apps, or the business apps such as Sales, Customer Service, Field Service, and Project Service Automation, are only supported by Dynamics 365 web applications.

Summary


In this chapter, we saw how the site map has evolved in Dynamics 365. Now, we can have multiple site maps per app and the built-in Site Map Designer tool in the product itself. We also had a detailed look at the new Site Map Designer and some common operations that can be performed through it. In the next chapter, we will cover the new Visual Process Designer and how it can be used to create business process flows with intuitive drag and drop capabilities.

 

 

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Implement business logic using processes, plugins, and client-side scripts with MS Dynamics 365
  • Develop custom CRM solutions to improve your business applications
  • A comprehensive guide that covers the new features of Microsoft Dynamics 365 and increasingly advanced topics.

Description

Microsoft Dynamics 365 CRM is the most trusted name in enterprise-level customer relationship management. The latest version of Dynamics CRM comes with the important addition of exciting features guaranteed to make your life easier. It comes straight off the shelf with a whole new frontier of updated business rules, process enhancements, SDK methods, and other enhancements. This book will introduce you to the components of the new designer tools, such as SiteMap, App Module, and Visual Designer for Business Processes. Going deeper, this book teaches you how to develop custom SaaS applications leveraging the features of PowerApps available in Dynamics 365. Further, you will learn how to automate business processes using Microsoft Flow, and then we explore Web API, the most important platform update in Dynamics 365 CRM. Here, you'll also learn how to implement Web API in custom applications. You will learn how to write an Azure-aware plugin to design and integrate cloud-aware solutions. The book concludes with configuring services using newly released features such as Editable grids, Data Export Service, LinkedIn Integration, Relationship Insights, and Live Assist

What you will learn

• Discover new designers tools included in Dynamics 365 CRM • Develop apps using the platform-agnostic Web API • Leverage Azure Extensions to design cloud-aware applications • Learn how to implement CRUD operation • Create integrated real-world apps using Microsoft PowerApps and Flow by combining services such as Twitter, Facebook, and SharePoint • Configure and use Artificial Intelligence Azure Cognitive Services for Recommendation and Text Analytic services

Product Details

Country selected

Publication date : Jan 30, 2018
Length 418 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788399784
Vendor :
Microsoft
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Jan 30, 2018
Length 418 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781788399784
Vendor :
Microsoft
Category :

Table of Contents

20 Chapters
Title Page Chevron down icon Chevron up icon
Copyright and Credits Chevron down icon Chevron up icon
Dedication Chevron down icon Chevron up icon
Packt Upsell Chevron down icon Chevron up icon
Contributors Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. Customize Application Navigation Chevron down icon Chevron up icon
2. Design Apps Using App Module Designer Chevron down icon Chevron up icon
3. Define Processes Using Visual Process Designer Chevron down icon Chevron up icon
4. Define Business Rules Using Business Rule Designer Chevron down icon Chevron up icon
5. Creating Custom Business Apps Chevron down icon Chevron up icon
6. Automate Business Processes Using Microsoft Flow Chevron down icon Chevron up icon
7. Develop Apps using Web API Chevron down icon Chevron up icon
8. Leverage Azure Extensions in Dynamics 365 Chevron down icon Chevron up icon
9. Using Editable Grids in Apps Chevron down icon Chevron up icon
10. Configure Microsoft Cognitive services Chevron down icon Chevron up icon
11. Train the Users through Learning Path Chevron down icon Chevron up icon
12. Other New Features in Dynamics 365 Chevron down icon Chevron up icon
1. Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.