Microsoft Dynamics 365 Extensions Cookbook

Book description

More than 80 recipes to help you leverage the various extensibility features available for Microsoft Dynamics and solve problems easily

About This Book

  • Customize, configure, and extend the vanilla features of Dynamics 365 to deliver bespoke CRM solutions fit for any organization
  • Implement business logic using point-and-click configuration, plugins, and client-side scripts with MS Dynamics 365
  • Built a DevOps pipeline as well as Integrate Dynamics 365 with Azure and other platforms

Who This Book Is For

This book is for developers, administrators, consultants, and power users who want to learn about best practices when extending Dynamics 365 for enterprises. You are expected to have a basic understand of the Dynamics CRM/365 platform.

What You Will Learn

  • Customize, configure, and extend Microsoft Dynamics 365
  • Create business process automation
  • Develop client-side extensions to add features to the Dynamics 365 user interface
  • Set up a security model to securely manage data with Dynamics 365
  • Develop and deploy clean code plugins to implement a wide range of custom behaviors
  • Use third-party applications, tools, and patterns to integrate Dynamics 365 with other platforms
  • Integrate with Azure, Java, SSIS, PowerBI, and Octopus Deploy
  • Build an end-to-end DevOps pipeline for Dynamics 365

In Detail

Microsoft Dynamics 365 is a powerful tool. It has many unique features that empower organisations to bridge common business challenges and technology pitfalls that would usually hinder the adoption of a CRM solution. This book sets out to enable you to harness the power of Dynamics 365 and cater to your unique circumstances.

We start this book with a no-code configuration chapter and explain the schema, fields, and forms modeling techniques. We then move on to server-side and client-side custom code extensions. Next, you will see how best to integrate Dynamics 365 in a DevOps pipeline to package and deploy your extensions to the various SDLC environments. This book also covers modern libraries and integration patterns that can be used with Dynamics 365 (Angular, 3 tiers, and many others). Finally, we end by highlighting some of the powerful extensions available.

Throughout we explain a range of design patterns and techniques that can be used to enhance your code quality; the aim is that you will learn to write enterprise-scale quality code.

Style and approach

This book takes a recipe-based approach, delivering practical examples and use cases so that you can identify the best possible approach to extend your Dynamics 365 deployment and tackle your specific business problems.

Table of contents

  1. www.PacktPub.com
  2. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Sections
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
      5. See also
    5. Conventions
    6. Reader feedback
    7. Customer support
      1. Downloading the example code
      2. Errata
      3. Piracy
      4. Questions
  3. No Code Extensions
    1. Introduction
    2. Modeling denormalized entities
      1. Getting ready
      2. How to do it
      3. How it works...
      4. See also
    3. Modeling normalized entities with a common parent
      1. Getting ready
      2. How to do it
      3. How it works...
      4. See also
    4. Modeling independent normalized entities
      1. Getting ready
      2. How to do it
      3. How it works...
      4. See also
    5. Using a Business Rule to show and hide attributes
      1. Getting ready
      2. How to do it
      3. How it works
      4. There's more...
    6. Building a configurable e-mail notification workflow
      1. Getting ready
      2. How to do it
      3. How it works...
      4. There's more
      5. See also
    7. Building your first action
      1. Getting ready
      2. How to do it
      3. How it works...
      4. See also
    8. Setting up the rollup fields
      1. Getting ready
      2. How to do it
      3. How it works...
        1. Frequency
        2. Programmatic Rollup Field execution
      4. There's more...
        1. Different types of aggregation
        2. Indirectly related activities
      5. See also
    9. Setting up calculated fields
      1. Getting ready
      2. How to do it
      3. How it works
      4. There's more...
      5. See also
    10. Duplicate detection using alternate keys
      1. Getting ready
      2. How to do it
      3. How it works
  4. Client-Side Extensions
    1. Introduction
    2. Creating your first JavaScript function
      1. Getting ready
        1. Visual Studio and Developer Tool Kit
        2. XrmToolBox's Web Resources Manager
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Wiring your event programmatically
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Writing reusable JavaScript functions
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Querying 365 data using the Web API endpoint
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Setting up the GET URL
        2. REST request
        3. Notifications
        4. Wiring
      4. There's more...
      5. See also
    6. Querying the 365 metadata services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Building a custom UI using AngularJS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Debugging your JavaScript with Edge
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Debugging your JavaScript with Chrome
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Unit testing your JavaScript
      1. Getting ready
        1. Integration with Visual Studio
        2. Assertion framework
        3. Faking Xrm.Page
        4. Headless browser
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Customizing the Ribbon
      1. Getting ready
      2. How to do it
      3. How it works...
      4. There's more...
  5. SDK Enterprise Capabilities
    1. Introduction
    2. Server-side concurrency control
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Client-side concurrency control
      1. Getting ready
      2. How to do it...
      3. How it works...
        1. Known limitations
      4. See also
    4. Executing a request within a transaction
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Batch requests
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Staging data imports
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Fixing errors
        2. Refreshing your instance's schema
      5. See also
    7. Creating early bound entity classes
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Interactive login
        2. Generate action messages
        3. Developer Toolkit entity generation
        4. Extending CrmSvcUtil
      5. See also
    8. Extending CrmSvcUtil with filtering
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Extending CrmSvcUtil to generate option-sets enum
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Migrating configuration across instances using the CRM configuration migration tool
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  6. Server-Side Extensions
    1. Introduction
      1. Plugins
      2. Custom workflow activities
      3. Custom actions
    2. Creating a Visual Studio solution for Dynamics 365 customization
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Creating a solution using the Dynamics CRM Developer Toolkit template
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more
        1. Create early bound classes
        2. Deploy changes to Dynamics 365
      5. See also
    4. Creating a LINQ data access layer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Creating your first plugin
      1. Getting ready
      2. How to do it
      3. How it works...
      4. There's more...
      5. See also
    6. Impersonate another user when running your plugin
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Creating your first custom workflow activity
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Creating your first custom action
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Wiring an IPlugin as a custom action
        2. Calling a custom action from your JavaScript
        3. Generate early bound custom action messages
      5. See also
    9. Deploying your customization using the plugin registration tool
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Plugin registration
        2. Plugin step registration
        3. Register actions
      5. See also
    10. Debugging your plugin in Dynamics 365 on-premise
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Debugging on a remote server
        2. Debugging a sandbox plugin
      5. See also
    11. Debugging your plugin in Dynamics 365 online
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  7. External Integration
    1. Introduction
    2. Connecting to Dynamics 365 from other systems using .NET
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Connecting to Dynamics 365 from other systems using OData (Java)
      1. Getting ready
        1. Java
        2. Azure tenancy
          1. Tenant GUID
          2. Application GUID
          3. Application permissions
        3. Dynamics 365
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Retrieving data from external resources using external libraries
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Connecting to Dynamics 365 using web applications
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Running Azure scheduled tasks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Setting up an Azure Service Bus endpoint
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Building near real-time integration with Azure Service Bus
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Consuming messages from an Azure Service Bus
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Running no code scheduled synchronization using Scribe
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Integrating with SSIS using KingswaySoft
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  8. Enhancing Your Code
    1. Introduction
    2. Refactoring your plugin using a three-layer pattern
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Replacing your LINQ data access layer with QueryExpressions
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Logging error from your customization
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Converting your plugin into a custom workflow activity
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Unit testing your plugin business logic
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Unit testing your plugin with an in-memory context
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Integration testing your plugin end-to-end
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Profiling your plugin
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Build a generic read audit plugin
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Using Cross-Origin Resource Sharing with CRM Online
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  9. Security
    1. Introduction
    2. Building cumulative security roles
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Configuring business unit hierarchies
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more ...
      5. See also
    4. Configuring access based on hierarchical positions
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Configuring and assigning field-level security
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Setting up teams and sharing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Setting up Access Teams
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Encrypting data at rest to meet the FIPS 140-2 standard
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Managing your Dynamics 365 online SQL TDE encryption key
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Reverting to a Microsoft managed key
      5. See Also
  10. DevOps
    1. Introduction
    2. Exporting Dynamics 365 solutions using PowerShell
      1. Getting ready
        1. Dynamics 365 prerequisites
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Deploying solutions using PowerShell
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Building a solution hierarchy
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Patching a solution
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Staging a solution
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    7. Using SolutionPackager to save solutions in source control
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There're more...
      5. See also
    8. Packaging your solution with configuration data using PackageDeployer
      1. Getting ready
        1. Dynamics 365 instance
        2. Dynamics 365 SDK
        3. Visual Studio
        4. Files
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Triggering builds on solution version increments
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Integrating your deployment cycles with Octopus Deploy
      1. Getting ready
        1. Octopus Deploy
        2. Dynamics 365
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  11. Dynamics 365 Extensions
    1. Introduction
    2. Dynamics 365 applications
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Limitations
      5. See also
    3. Dynamics 365 Common Data Services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Building a Dynamics 365 PowerApp
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Using Flow to move data between CDS and Dynamics 365
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Execution monitoring
      5. See also
    6. Installing a solution from AppSource
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Using the Data Export Service solution for data replication
      1. Getting ready
        1. Office \ Azure tenancy
        2. SQL database
        3. Key Vault
        4. Change tracking on custom entities
      2. How to do it...
      3. How it works...
      4. There's more
      5. See also
    8. Building Power BI dashboards from CRM data
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  12. Architectural Views
    1. Business view
      1. Customer management
      2. Search
      3. Sales management
      4. Case management
        1. Knowledge-based articles
      5. Field servicemanagement
      6. Customer self service
      7. Marketing
      8. Mobility
      9. Business process automation
      10. Project automation
      11. Survey management
      12. Social Network analysis and engagement
    2. Logical view
    3. Deployment view
      1. Manual
      2. Automation
    4. Non-functional requirements
      1. Availability
      2. Reliability
      3. Recoverability
        1. Data redundancy
        2. Disaster recovery
        3. Backups
      4. Security
        1. Data encryption in transit and at rest
        2. Authentication
        3. Authorization
        4. Compliance certificates
      5. Auditability
      6. Performance
        1. Microsoft infrastructure
        2. Hard limitations
        3. Azure ExpressRoute
        4. User interface enhancements
      7. Scalability
      8. Interoperability
        1. Web services
        2. Plugins and workflows
        3. Client-side integration
        4. Integration tools
      9. Flexibility
        1. Configuration
        2. Client-side extensions
        3. Custom .NET code for server-side extensions
        4. Custom reporting
      10. Portability
      11. Reusability
      12. Deploy-ability
        1. Solution deployments
        2. Rollbacks
        3. Upgrades
      13. Manageability
  13. Dynamics 365
    1. Rebranding
    2. Modularity
    3. Licensing
      1. Instances
      2. Storage
      3. Further reading
    4. Dynamics 365 Add-ons
    5. Conclusion

Product information

  • Title: Microsoft Dynamics 365 Extensions Cookbook
  • Author(s): Rami Mounla
  • Release date: June 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781786464170