0% found this document useful (0 votes)
102 views10 pages

Dynamics 365 Extensibility Guide

This document provides an overview of extensibility in Dynamics 365, which allows customizing the software to fit business needs. It discusses extending tables, classes, and creating method wrappers. Extending tables is done by right clicking in the AOT and selecting "Create Extension". Class extensions are created by defining an ExtensionOf attribute and ensuring the class name follows conventions. Method wrappers have the same signature as the original method and invoke the chain of command by calling the next keyword.

Uploaded by

nikhil arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views10 pages

Dynamics 365 Extensibility Guide

This document provides an overview of extensibility in Dynamics 365, which allows customizing the software to fit business needs. It discusses extending tables, classes, and creating method wrappers. Extending tables is done by right clicking in the AOT and selecting "Create Extension". Class extensions are created by defining an ExtensionOf attribute and ensuring the class name follows conventions. Method wrappers have the same signature as the original method and invoke the chain of command by calling the next keyword.

Uploaded by

nikhil arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ULTIMATE GUIDE TO

EXTENSIBILITY IN
DYNAMICS 365
WHAT IS EXTENSIBILITY?
In Dynamics 365, extensibility
lets you customize the
software to fit your business
needs. You can add new fields,
change how things look, or
even create new functions to
make it work just the way you
want.
LETS
CODE!
TABLE EXTENSION
Navigate to the AOT (Application Object Tree)
Select any table from the AOT. Lets say: CustTable
Right click on it & select Create Extension.
This creates an extension in your current opened solution.
Creating extensions for
All other elements is done
by the same approach
except classes
CREATING A CLASS EXTENSION
Create a new empty class & name is as follows:
Prefix + ClassName + _Extension

So for example if I am creating an extension of class


PurchAgreementEventHandler then the name for its
extension class would be:
DNPurchAgreementEventHandler_Extension
CLASS EXTENSION STRUCTURE
The ExtensionOf attribute defines what this
class would be the extension of with the name
of the default class being explicitly mentioned.

The name ensures that proper


final keyword ensures that naming convention is being
this class cannot be followed and that extensions are
extended by any other class. easily identifiable.
CREATE A METHOD WRAPPER
A method wrapper is our custom method that will be wrapping
around the original method of our default class.

The method wrapper is nothing fancy. A simple method with the same
signature as the default class method.
Signature = Access modifier + return type + Name + Parameters
CHAIN OF COMMAND (CoC)
The next keyword is used to invoke a chain of command call. In
order for the wrapper to be effective, a call to next is
mandatory.

Call to next keyword for Running custom logic based on


position of written code
the CoC to be invoked.
before/after next call.
Hi there, I'm Taha

Follow me for more daily posts.

You might also like