web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / mfp's two cents / Extending WHS – Adding a ne...

Extending WHS – Adding a new location directive strategy

Michael Fruergaard Pontoppidan Profile Picture Michael Fruergaard ... 1,616

To create a new location directive strategy, follow these steps:

  1. Create an enum extension of the WhsLocDirStrategy enum. Add an entry with name and label for your strategy.
  2. Create a class extending the WhsLocationDirectiveStrategy abstract class. Implement the performStrategy() method
  3. Decorate your new class with the WhsLocationDirectiveStrategyFactoryAttribute, linking your class and enum entry together.

Notice: The strategies are instantiated only once each – following the singleton pattern. This means your strategy class must not contain any state.

Here is a diagram showing the extension points:

WHSLocDir1.png

Here is an example:

WHSLocDir2.png

THIS POST APPLIES TO MICROSOFT DYNAMICS FOR OPERATIONS SPRING 2017 PREVIEW; IS PROVIDED AS-IS AND CONFERS NO RIGHTS.

Comments

*This post is locked for comments