D365 – To exist or not, that is the question!(part 2)

Some years ago I created a free community solution for “Not-Exists Join“. Not exists join means that we can filter and search on data that does not have any relational records. This answers questions like;

– Show me all customers that have no sales orders the last X days

– Show me all items with no inventory transaction. Show me items with no movement last 30 days.

– Show me all items that have no price.

Countless community friends have used this for AX 2012. But since Dynamics 365 was released this solution could not be applied. To make it properly I have decided to push a request through the CDE (Community Driven Engineering), and hopefully making it available to all D365 customers as part of the standard solution. All code is ready and checked-in , and I’m just waiting for Microsoft review.

The way the CDE works, is that partners and customer that have code or bugfixes can work together with Microsoft on implementing changes. It is Microsoft that have the final decision, and they will also make it part of their IP. But for all you community friends, here is a sneak peek of what I’m working on together with Microsoft.

The advanced filter and query in Dynamics 3656 are a very powerful tool. Here you can search and filter on most fields and add join relations to the query.

But there is one area that the advanced query screen is not handling. That is “not-exist-join”. Let’s say I want a list of all the customers that don’t have sales orders. The standard D365 will not help here. The purpose of this document is to show how to implement “not-exists-join” into standard.

Functional Solution

In the joins form, a new section of relations has been added that represents the tables that can be “not-exist-join” added:

In this sample the customers will no sales orders will be in the query result/form. But the feature are generic, and all 1:n relations can also be selected as a “Not exists” relation.

When will you have this in standard? Maybe 10.0.10?? It depends on Microsoft and final approval of the code and feature. But hopefully it should not be in the far future. But “cheer and share” and maybe we as the community can accelerate this very requested feature.

D365 community ROCK’s and Happy DAX’ing!!

Microsoft Bookings and Microsoft Graph

One common feedback we get when implementing Dynamics 365 is the ability to handle appointments and booking. There are many very good 3’rd party solutions, but did you know that Microsoft have an easy to use booking system that works online and integrated with Outlook. It’s called Microsoft Bookings, and is worth taking a small look at especially if you have the need of booking your customers for appointments and simple services. Microsoft Bookings provides online and mobile apps that make appointment scheduling simple and efficient for small businesses and their customers. Any small business that provides service on an appointment basis, such as auto repair shops, hair salons, and law firms, can benefit from having their bookings managed so as to free up time for the more important task to grow their business. Microsoft Bookings is available to businesses that have an Office 365 Business Premium subscription.

Here is a small live demo for you my friends: https://outlook.office365.com/owa/calendar/DXCCommerce1@dxccommerce.onmicrosoft.com/bookings/

The first page an online customer arrives at is the following screen, that can be published on Facebook or any social media sites. Here I choose to order my haircut from my favorite hairdresser. (Full manual is available here)

 

When booking I will get a confirmation email, and the booking coordinator will also get an email. The booking is also available on my phone:

 

On the back-office side, Microsoft have created a simplified view of managing and setting up your bookings:

Here you manage the calendar, customers and staff.

Here is the calendar for a specific day showing all appointments and bookings for today. Drag and drop of appointments between staff and dates is of course possible.

You can also manage you staff.

And the services you offer and map them towards your staff.

 

If you are a functional person, then just stop reading here, because here comes the good part: There is a complete API interface your you to integrate towards booking. (See also this link) Connecting this towards Dynamics 365 or commerce apps can be done by a developer, and makes it possible to expose booking services to POS, call-center and with tight integration to your Dynamics 365 solution.

Check out Microsoft Booking and Microsoft Bookings API in Microsoft Graph.

Here are some sample pictures on how to access the Booking system using Microsoft Graph. First, here I list all the booking sites listed in my tenant:

Pay attention to the fact that it returns and “id”, that identifies my booking on a specific store. If I now queries for bookings at the ID like this:

https://graph.microsoft.com/beta/bookingBusinesses/DXCCommerce1@dxccommerce.onmicrosoft.com/appointments (You will not get access to this link, but you are welcome to click it )

I get the following, where the service is listing up all bookings posted into Microsoft Bookings. A consent through the azure portal must be setup. And the great thing is that is actually is a two-way service. I can post bookings in.

BOOM! Take that! We now have a complete interface towards all services that Microsoft Graph can expose and can let us integrate on a completely new level.

If I wanted, I can now connect my bookings to any planning engine that would add more value to the service. Like picking me up in a golden limo-cab when I book my hairdressing hour. The possibilities are endless. Also remember that this is not restricted to bookings, but all services that azure may provide. We in the Dynamics partner community have just scratched the surface of the possibilities that Microsoft now provide.

Happy DAX’ing friends.

Dynamics 365 Branding and Commerce (Preview) Firsthand experience

PS! Remember to read the last lines in this blogpost

As I hope you have seen in your never-ending twitter/news feed is that Microsoft again adding lot’s of new apps and features to Dynamics 365. Microsoft are delivering on the communicated vision of Dynamics 365. We now have apps where we have a holistic approach to business processes. To solve business requirements users will be using a combination of apps that works natively together. We see how the entire solution is being connected, and further split up into specific areas. In the old days when we had large ERP suites, and we sold functional modules. We are now implementing connected apps that enable business processes per user. If anyone wonder what the “new” hashtag is, it is easy: “#MSDyn365“, and get used to it. We no longer a need to put things into additional silo’s to explain the legacy, and to succeed we must embrace and deliver the right combination of apps that solves the business requirements per business process.

One of the most exiting news in the current wave 2 release is the delivery of Dynamics 365 Commerce(preview). I have been privileged to validate and try of this solution the last days. My current experience is that: This Rock’s! Microsoft finally can deliver a complete suite to give a true omnichannel experience. One interesting finding is that Microsoft will rebrand their “Dynamics 365 for Retail” offering to “Dynamics 365 Commerce”. Why? Because what is now being offered extends the binderies of the traditional retail solutions. As seen in the following figure you can get a complete integrated end-to-end system. And this is not just for retailers, but for all companies that want to digitalize their processes and offer true omnichannel can benefit of this.

1 : Picture from Microsoft presentations

To try out this new solution, you can request a preview. You ask for a preview here. When/if accepted you will receive an email from Microsoft containing instruction on how to deploy this preview. This guide is also available her and it is important that the guide is followed very carefully. To complete the guide, you need to get some assistance from you Azure AD tenant administrator. Also, the preview is currently only deployable to US Azure datacenters, and this put’s some latency into the commerce experience.

One interesting thing with the commerce, is that even though this is a tier-1 environment, you get the possibility to deploy RCSU and the e-Commerce Server. The data set is basically standard Dynamics 365 for Retail, where the configuration key for retail essential enabled. So we can showcase that the Dynamics 365 Commerce also can be delivered as a standalone app or be extended with the finance and supply chain management apps.

The preview commerce solution is what you expect an e-commerce solution to be:

The back-end editor for the editor is easy to use, and it is easy configure your

To get a full understanding of the solution also head over to Microsoft DOC’s to learn more : https://docs.microsoft.com/en-us/dynamics365/commerce/

But I’ll do something better for you; You can check-out the preview solution yourself right now: https://d365commerceus2ecom-eval.commerce.dynamics.com/DXCCommerce (I expect that the site will be available for a only few days, so hurry)

If you want to buy something use Card number: 4111-1111-1111-1111, Expiration: 10/20, CVV: 737 . Also remember that this is a US-based Azure Datacenter and NOT a production grade scaled system.

Happy DAXing and DXCuLater!

D365 Retail – Buzz Alert !

THIS IS COOL !
Microsoft is launching several new product lines for retailers.

Dynamics 365 Commerce

Empower your business to create exceptional, insightful shopping experiences for every customer with Dynamics 365 Commerce—built on our proven Dynamics 365 Retail solution.

https://dynamics.microsoft.com/en-us/commerce/overview/

Microsoft Connected Store

Empower retailers with real-time observational data to improve in-store performance. From customer movement to the status of products and store devices, Dynamics 365 Connected Store will provide a better understanding of your retail space. (Check out the video)

https://dynamics.microsoft.com/en-us/ai/connected-store/

 

 

D365F&O, Lots of new high value content on DOC’s

The Microsoft Dynamics team have been quite buzzy after the vacation producing a lot of valuable content to Dynamics 365. I would like to highlight some of the latest additions that is worth checking out and to share in the Dynamics 365 ecosystem. Just this year alone, 714 articles have been published, and just the last 2 months close to 300 articles are made available. With this amount of information, I do get questions if there are some hidden gems on docs. And here some of them are:

1. Learning catalog

There are now more tailored learning paths towards customers and partners, with references to free, self-paced online learning path, Tech-talks, and formal instructor-led training. Here you will find articles, videos, and all you need to start learning Dynamics 365.

2. Test recorder and Regression suite automation tool for Retail Cloud POS

Now we can start creating regression testing on Retail POS. Cool stuff, and in my mind where we actual see the true value of regression testing. Retail is Detail, and this delivers quality.

3. Master planning setup wizard

Setting up master planning involves taking many decisions and here you can read how this is done in 10.0.5.

4. One Version service updates FAQ

This page answers a lot of question on the One Version strategy, and what this means for you. At many customers I see that extensive, time-consuming and costly testing processes are being manually executed each time Microsoft is releasing a new monthly updated. Why? I do not see the need to perform full testing on all modules on a monthly basis. Yes, it is a fact that nobody releases flawless code. (Even not Microsoft), but if you follow the procedures and guidelines from Microsoft, the monthly updates should be safe to deploy. There are several release rings and programs in place ensuing that quality is in place at GA. (General Available). Please align to the release cadence updates, and focus on your essential core processes. If you find painful bugs, report them asap.

5. Environment planning

I have seen several projects where the focus is to save costs on implementation environments. This page explains a lot on Microsoft’s take on this. My simple advice is use Tier-1/One box for development on a cloud hosted CSP subscription, and the rest of the environments as Tier-2 or higher (my recommendation is to have 2 additional Tier-2 environments for larger projects). The benefit to use self-service processes is priceless. Also keep in mind that Azure costs are very cheep compared to consultancy hours trying to maintain and manually transfer databases between environments. Also take a look at the great Denis Trunin’s blogpost on development VM’s performance.

6. Business events overview

This is the future and start adopting this feature into your business processes. This is also a key enabler for working closer with the Dynamics Power platform.

7. Regulatory updates

Here you find localized information for your country, and how to comply to specific local requirements. This is being updated very often.

8. Unified product experience

Do you want to keep the products from D365F&O synced with D365Sales ? This article explains how to achieve a near real time bi-directional integration with CDS. Great stuff also explaining dual write capabilities.

9. Adyen payment processing with omnichannel experience

Payment connector is far more versatile than just for retail. Also check out the FAQ.

10. Asset management

Great stuff on the horizon. Keep track of your stuff

11. Franchising

No longer in the official 2019 Wave 2 release. So, we must keep waiting for this in the future.

 

Take care, and

DXC you later

 

 

Analyzing Cloud POS performance in Dynamics 365 for Retail

It is a constant requirement that systems retailers are directly interacting with should be Bigger, Better, Faster, Stronger (BBFS). In this blog post, I will dig into how the POS performance can be analyzed to better understand the transactional performance of the Dynamics 365 POS. What I’m specially interested in is how perceived performance is towards actual. What we think is good performance is relative to the observer. The average reaction time for humans is 250 ms to a visual stimulus, but newer studies shows that we can identify visual stimulus down to 13 ms. Your screen has a refresh rate of 17 ms. As time is relevant and the expected performance is close to real-time, this can sometimes lead to performance expectations that is actual irrelevant towards what is wanted to be achieved. We as humans cannot go beyond 250 ms visual response time, so this is important to keep in mind.

As you can see in the following video, 4 items is scanned and then a quick cash payment is done. The total time taken to complete this example transaction in CPOS is approx. 5 s.

But as you can see on the screen, there is a lot happening, and when the user interface is being redrawn. I wanted to go deeper to understand exactly what is happening when scanning. More specifically on what’s happening when adding the sales lines in the POS.

As the CPOS is a 100% web based application, we can use Google Chrome to take a deeper look into exactly what is happening. By pressing the F12(Or CTRL-Shift-I), you get up the developers tools.

Then start the recording (CTRL-E), add a line in POS, and stop the recording. Then you will see:

1. CPU load, Activity bars, Network calls
2. The actual animation on the POS display each millisecond
3. Exactly how long calls to the Retail Server is taking.
4. The entire REST-call stack being executed on the CPOS client.

Here you see an example where I added one line to the POS basket, and this resulted in 2 calls to the retail server.

If we look at one of the calls happening:

ScanResults() (*.dynamics.com/Commerce/ScanResults(‘07100’)?$expand=Customer&api-version=7.3) – This scans the product/item barcode and sends it to the retail server. In google development tool, we can analyze exactly what is taking place on this call. Here we see that the total time was 559.54 ms but the actual waiting time for the RSSU to respond is 263,69 ms(Waiting TTFB). The browser is waiting for the first byte of a response. TTFB stands for Time-To-First-Byte. This timing includes 1 round trip of latency and the time the server took to prepare the response.) I have measured the network latency to this Tier-2 with RCSU system to be 40 ms.

If I scan the item again, we see that the caching of DNS etc kick’s in the TTFB lowers to 132,80 ms.


As you can see you can really go deeeep, and analyze all what is happening, from client execution to server execution, without any debugging tools. Down to the milliseconds, and better understand the performance. The profile created can be exported and imported for deeper analysis. We can see that there are many factors that influence performance, from network delay’s to form refresh. Microsoft could have the pleasure of shaving milliseconds of the animations, server calls and J-scripts, but this is an ongoing investment from and R&D perspective.

My honest opinion is that the Cloud based Dynamics 365 for Retail POS is performing good. Network elements and the speed of light is a fundamental restriction. The use of animations also seams to affect how performance is perceived, but it does not affect the general performance and usability. Legacy system that is on-prem have the benefit of not having latency, but the cloud solution brings so many other positive elements. If you choose MPOS instead, these tools are not available and you can use fiddler for analysis. But a small tip is to have a CPOS client available when performance testing, as this also will affect MPOS.

Bigger, Better, Faster, Stronger !

Retail statement trickle feed (public preview)

Retail statements are one of the most important (and complex) processes a retailer have. It’s where the retail sales and transactions are being transformed to become physical and financial transactions so you can see the sales in finance and in inventory. Retail statement calculation and posting have been covered many times in my blog posts and Microsoft have a large set’s of article on doc’s on the matter. The amount of transactions retail statements calculates and post is to my knowledge THE most complex and intense feature and business process in the entire Dynamics 365 solution. Imagen that every sale, in every store is being processed. For larger retailers Dynamics 365 for Retail are processing millions of transactions daily. This area really put’s computational pressure in the systems and is also one of the areas where Microsoft is investing heavily.

Since the start of D365 there have been done hundreds of improvements on retail statement posting, and the next “big thing” is Retail Statement trickle feed. One of the pain’s in today’s solution is a significantly delay between the when the retail sales have been conducted, and when the inventory transactions have been financially posted. And in short, when the inventory transaction gets a financial status like “Sold”. Why is this important? Because the inventory transactions define on-hand values, as again it defines how the master planning/replenishment is calculated. We want this to be as accurate and up to date as possible. Any delays in having accurate on-hand influences planned purchase orders. Also the ability to spread out the processing of transactions through the day will reduce the amount of “spikes” in the Azure SQL load, making the nightly timeslot more open for other high intensive transaction processing tasks.

Another critical benefit of trickle feed is the decoupling of transactional statements and financial statements. Now you can post transactional statements without even posting a financial statement, and the other way around. Together with the increase of posting frequency that produce small bundles of transactional statements, it will address the main reason for the compounding effect that prevents a series of statement from being posted due to a single invalid transaction. Right now, the only validation that impact financial statements is that all retail transactions for a given shift must be present in HQ in order for a financial statement to be posted. However the transactions don’t need to be successfully posted for a financial statement to be posted.

There is also a new aggregation strategy, where unnamed transactions are always aggregated and named(customers) transactions are never aggregated. There is no more option available to turn aggregation on or off.

Microsoft have made the following improvements to the statement posting process:

  1. Deprecate the “inventory job” that creates temporary reservations.
  2. Create a new job that will, at a predefined schedule, create sales orders, invoice them, and create, post, and apply payments for all the transactions that are synchronized to the HQ at that point of time. In addition, it will also create any ledger journals that need to be created for discounts, gift cards, and so on.
  3. The statement document that gets created at the end of the day will only be used to calculate and post any counting variances.

To enable the new preview (10.0.5) trickle feed solution you have to enable the Retail Statement (trickle feed) – preview configuration key. Also remember to disable the other retail statements configuration keys, and that you don’t have any open statements when doing this.

When finally released (GA) I hope that the new the new feature management is used for enabling this.

When this is done, you will see a set of new menu items. Under the menu \Retail\Retail IT\POS Posting.

The sequence of these batch jobs is to be able to financially post most of the transactions, and the financial statement posting will only be used to calculate and post any counting variances. There is no need to run the “Post inventory” job anymore. But in reality, there is a decoupling, and the transactional statement and financial statement can post independently if the other have not been posted. The only actual requirement is that the P-job have fetched the retail transactions from the retail channel database.

If we look into the Retail Statement form, we now have the possibility to manually create transaction posting and financial reconciliation (That in the essence is the financial statement).

When creating a “Transactional posting”, we see that the form is a bit changed compared how it was before. There a no lines related to payments.

When posting the transactional statement, the following steps are performed:

When calculating and posting a financial statement, you see the more traditional statement posting screen, where you have the payment lines:

The steps in the posting is the following:

The summary of this, is that Dynamics 365 will with trickle feed support a much faster updating frequency to get proper on-hand values and scalability. Since the transaction statement will be running more frequently it also means that there will be less retail statement posting in the evening/night. The transactions will be smaller and therefore also easier to post. But there are a few things to keep in mind. If you trickle feed too often, you will miss out on the transaction aggregation on the unnamed transactions, and will have to process more sales order invoicing per day. This can again slightly increase the load in your system.

This feature will also increase scaling of the system, as posting of transactions can be better load balancing among multiple AOS-batch services. I also have a feeling that there will be more features in this area to come, that will further enable close to real-time master planning, inventory services, and close to real-time power-BI reporting.

 

Next on customers wish list is a super-duper-fast invoicing service of sales orders(retail), as this still is the most resource demanding task in the processing of retail transactions. It is also in the roadmap the ability for the store manager to perform and generate the financial statement when a shift is closing in POS.  The financial statement in HQ in this case will post whatever the financial statement generated in POS defines, breaking the requirement of having all transactions uploaded to HQ db. And beyond this Microsoft is as always improving general performance by working close with customers and partners. We see that the data distribution and different usage of retail statements require different indexes and Microsoft invests heavily in improving how queries are executed.

 

Great work to the Microsoft team working on the retail statement processing.

 

Here is a small joke for all of you that don’t care about retail statement posting

 

 

D365: Search for code with Agent Ransack

When supporting customer’s we often can get small fragments of information on an issue, like a form is not performing as expected, or an error message. The procedure is then often to log into LCS and find traces of the issue. Often we end up with a query that is the source of the issue. But to better understand and analyze how to fix the issue we often need to find exactly in the source code where the query is executed. By also being more exact and precise towards Microsoft support you also get quicker response.

Searching through the code in Visual Studio can be time consuming, and the built in Cross reference is not always updated, but there is an alternative I can recommend. Agent Ransack is a free file searching utility that quickly can scan most D365 source code (the *.XML files placed in K:\AosService\PackagesLocalDirectory\).

Let’s say I see in the LCS that the current query is what I need to find out from here it is executed.

From the query I can then search for the text “Join RetailEODTransactionTable”, and I get 25 results, and even where the exact table is not specified as

I can then open the file in explorer and then validate to see if I need to go into Visual Studio for further analysis.

This speed up the process of finding the source code that you are looking for. It is free and download it from https://www.mythicsoft.com/agentransack/ and install it in you development environment.

 

Take care Daxer’s.

Meetings: Every minute counts, and snooze to 1 minute before meeting starts

As a consultant I’m used to having a lot of “back-to-back” meetings, and when the next meeting is near, I typically get an outlook reminder 15 minutes prior to the meeting.

Then using the “Snooze” button is good. If I snooze until 5 minutes before I am too early. 0 minutes before and I am too late. You know that in the drop-down, the minimum selection is 5 minutes? That is too much for me. I would like to have a new reminder when it is 1 minute before the meeting start. But did you also know that you can type into the field? You can actually write “1 minute”, and this will then remind you when it is 1 minute to the meeting start.

A smaller more advanced way is to set the default reminder to 16 minutes, prior to the meeting

And then when the reminder “pop’s” up, to can select to “Snooze” and select to be reminded in 15 minutes. That is exactly 1 minute before the meeting starts.

Now I have just “earned” 4 more minutes where I can create D365 customer value before the meetings starts

D365F&O – Address performance tips

Sometimes the smallest thing can make a huge difference. At a customer we experienced a huge load (DTU +70% average), and the LCS shows that there was a single SQL query that was the reason for the load. The data composition here was that there was close to a half million customers in the customer table, and most of them had addresses, email and phone numbers assigned to them. Except of the customers used for retail statement processing.

In LCS environment monitoring you can see this as spikes in the overview.

 

The query you typical see looks like this:

(@P1 int,@P2 nvarchar(256),@P3 int,@P4 bigint)SELECT TOP 1 T1.COUNTRYREGIONCODE,T1.DESCRIPTION,T1.ISINSTANTMESSAGE,T1.ISMOBILEPHONE,T1.ISPRIMARY,T1.ISPRIVATE,T1.LOCATION,T1.LOCATOR,T1.LOCATOREXTENSION,T1.PRIVATEFORPARTY,T1.TYPE,T1.ELECTRONICADDRESSROLES,T1.MODIFIEDBY,T1.RECVERSION,T1.PARTITION,T1.RECID FROM LOGISTICSELECTRONICADDRESS T1 WHERE ((T1.PARTITION=5637144576) AND ((T1.TYPE=@P1) AND (T1.LOCATOR<>@P2))) AND EXISTS (SELECT TOP 1 ‘x’ FROM LOGISTICSLOCATION T2 WHERE ((T2.PARTITION=5637144576) AND (T2.RECID=T1.LOCATION)) AND EXISTS (SELECT TOP 1 ‘x’ FROM DIRPARTYLOCATION T3 WHERE ((T3.PARTITION=5637144576) AND (((T3.LOCATION=T2.PARENTLOCATION) AND (T3.ISPOSTALADDRESS=@P3)) AND (T3.PARTY=@P4)))))

By downloading the query plan, we see that there is a index seek on the table LOGISTICSELECTRONICADDRESS.

 

This results in that the indexes don’t get a good “hit” on the logisticselectronicaddess.type.

The solution was surprisingly easy. Add Phone, Email address and URL to the customers.

 

Then the DTU drastically goes down, and normal expected performance was achieved.

 

Conclusion; Remember when having many customers, to fill inn contact information.

This just must be shared

D365F&O – Community Driven Engineering

I have previously blogged about the importance of reporting new ideas, issues and bugs to Microsoft, and also why the community will benefit from sharing. I see that experienced engineers have the solution available and are more than willing to give it for free to get the fixed-up code into the standard solution to benefit customers and future projects.

 

But the formalized support path does require time and energy and remember that not all Microsoft support consultants are engineers that you can discuss X++ topics with. But how can the process of contributing to the D365 community be easier?

But did you know that Microsoft have a program for Community Driven Engineering with Dynamics 365 F&O? This covers not only bugs, but also new features. Community driven engineering (CDE) is a Microsoft effort to make external engineers more efficient at providing recommended bug fixes as minor features to Microsoft, as well as to make Microsoft more efficient in accepting fixes from the community. If the fix is accepted, it will be merged into the main Dynamics 365 F&O branch. I have tried the program, and reported in a fix for auto-report as finished, and the fix was accepted, and hopefully in the near future the entire community can benefit from it.

How to start?

If you have the right skills and the willingness to share and give away your fixes (or features) you can sign up at https://aka.ms/Communitydrivenengineering. You need to be accepted into the program, and your user must be whitelisted before you can access. The CDE also have a private Yammer group, that you get access to when accepted. But I must warn you. This program is meant for the most experienced and technical people we have in our community, and that are deep into X++ and AzureDevOps. You must have approval from CxO-level in your organization that you can share code with Microsoft. (Lawyer stuff)

Here is the overall flow for the external engineer:

  1. You create a bug or a Feature in CDE Azure DevOps
  2. The bug or Feature is reviewed by the MS team and accepted or rejected
  3. You create a branch for this work and commit in this branch
  4. When done you create a Pull Request
  5. The Pull Request is reviewed by the MS team and feedback is provided
  6. After some iterations the Pull Request will be approved and complete
  7. The MS team will take over the code and include in a future release

Here are the more technical details of how it works.

The following text is copied from the onboarding documentation of the CDE.

It takes approximately one hour to get started with CDE, the majority of which is the initial build time.

  1. Obtain a development VM from LCS with build 8.1.195.20001 (app 8.1, platform update 22) or later. The latest branch I have access to is 10.0.80.19, that basically is 10.0.2 PU 26.
  2. Make sure you have opened Visual Studio at least once on the VM to sign in and pick default settings.
  3. Install Git on the machine from https://git-scm.com/downloads . The default installation options should work fine.
  4. From an administrator command line instance, clone this repo to a location on the machine.
    pushd k:\
    mkdir git
    cd git
    git clone https://dev.azure.com/msdyncde/_git/cde

  5. Define your user name and email in Git
    git config –global user.name “John Doe”
    git config –global user.email johndoe@example.com

  6. Mount the git repo into the F&O deployment
    pushd K:\git\cde
    powershell .\Mount.ps1
  7. Open Visual Studio as administrator and rebuild the following models
    ApplicationSuite
    ApplicationWorkspaces
    FiscalBooks
    GeneralLedger
    Project
    Retail
    Tax

At this point you can start development(in the SYS layer actually)

How to submit a change?

Changes submitted by the community are committed to the same REL branch matching the version on the dev VM. Once the pull request (PR) is completed, that signals that Microsoft has officially accepted the change and it will show up in a future official release, usually the next monthly release (depending on what day of the month the release closes). The change will only enter the master branch of msdyncde through a future official release. Syncing to the tip of a REL branch will pull in other community changes submitted from that version.

  1. Create a Bug or Feature depending on whether the change is related to incorrect behavior of existing code, or new behavior.
    https://dev.azure.com/msdyncde/cde/_workitems
    New work item > bug
    Fill in the title, assign it to yourself, and set the Area to your best guess as to where the behavior belongs (will help us review appropriately)
    In repro steps and system info, provide information on why this change is necessary
  2. In Git, create a topic branch to work on. Branches are usually named by username/bug number.
    git checkout -b johndoe/482
    git push –set-upstream origin johndoe/482

  3. In Visual Studio make changes to Application Suite SYS code as normal. Changes are actually being made directly in the Git folder.
  4. Push your changes to VSTS.
    git add -A
    git commit -m “Message explaining what is being changed”
    git push

  5. Send a pull request from VSTS
    https://dev.azure.com/msdyncde/_git/cde/pullrequests?_a=mine
    New pull request
    Source branch = johndoe/482, Destination branch = Rel_8.0.30.8022 (or whatever version you have)
    Fill in the title and description, link the work item > Create

Any feedback from Microsoft reviewers (or other Community reviewers) will show up in the PR. Changes can be made to the PR by editing in Visual Studio, and doing git add / commit / push again. Once Microsoft has signed off, all comments have been resolved, a work item is linked, and all other polices have been met, then you can click Complete to complete the pull request. When a PR is completed, that is official acceptance by Microsoft that the change will become part of a future official release, usually the next monthly release.

Behind the scenes

  • The powershell script starts by checking what version of source code exists on the VM by examining the K:\AosService\PackagesLocalDirectory\ApplicationSuite\Descriptor\Foundation.xml file.
  • It then checks out the REL branch associated with that version, which matches the platform and other model versions currently on the machine.
  • The development config files are updated to allow changes to SYS models, which is normally disallowed on dev VM’s.

In addition to having an accelerated approach to get fixes into main branch, participants also have some more benefits. You will have access to the latest & greatest code changes through all code branches that Microsoft makes available. You can search through the code and see if there are code changes that affects extensions or code that is local to you installations. You can also see how the Microsoft code is evolving and improvements are made available in the standard application. You will also build gradually very valuable network towards the best developers in the world, where you will discuss technical topics with the actual people creating the world’s best ERP-system.

One final joke for those considering going into this program: Git and sex are a lot alike. Both involve a lot of committing, pushing and pulling. Just don’t git push –force


D365F&O – Auto-report as finished in a Retail scenario

For many years I have had the opportunity to work on Dynamics 365 topics involving Kitting, Value Added Services(VAS) and Bill-of-Materials(BOM). Today I would like to write about the released product parameter “Auto-report as finished” in a retail scenario, and you can read more about report as finished at the Microsoft docs. To explain the business scenario, let’s take hot-dogs. A hot-dog is normally assembled as the customer wants, but in this scenario, we have a standardized hot-dog with 4 ingrediencies.

As a retailer, I would like to sell the finished product, but keep track of the raw materials. To do this you need to create a BOM, and when the hot-dog is sold, Dynamics 365 will automatically report a hot-dog as finished, and draw the ingrediencies from the store warehouse. It is possible to use a production order, but for retailers this is overkill. Something much easier is needed. Instead of exact BOM’s, then average BOM’s can also be used, since knowing exactly how much onion or mustard the customer will apply is not an exact science.

Dynamics 365 have a nice feature for this; Auto-report as finished.

What this parameter does, is then when the product is physically deduced (or Sold) a BOM journal will be created and posted. This will create issue-transaction (sold) from your inventory.

Here I have created a BOM for my hot-dog:

When creating a sales order and posting a packing slip you will see that a Bom journal is automatically created and posted.

The posted BOM Journal looks like this, and here we see that a hot-dog is added to the warehouse, while the ingrediencies are subtracted from the warehouse.

For retailers, this means that we can sell goods in the POS, and when the statement posting process is creating and posting sales orders, the auto-report as finished functionality will be posted. So, no need of any production order, or manually posting Report as Finished journals. So, Dynamics 365 have an alternative to retail kit’s, if a more standardized BOM’s are used. The BOM can then also be used for cost calculations on food and retail produced items. Comparing the counting and the actual transactions will also help to know how accurate the BOM are for describing the cost picture of the products. Master planning will also catch this, and you can get replenishment to work on ingrediencies.

BUT!!! There are some issues.
As a workaround and to make this work you will have to specify default warehouse per site per item in the default order settings.(I know this is an impossible task if you have 500 products and 500 stores, as this would mean you have to create 250.000 default order settings). I have a support request going with Microsoft to change this, so that this is not needed, and that the warehouse can be inherited from the parent transaction. So, if you get error like this, then you have done nothing wrong, and hopefully it will be fixed on future releases.

STOPP HERE, unless you like X++

Here is something for the “technical” guys; The code that automatically triggers this auto-report as finished is actually the class InventUpd_Physical.updatePhysicalIssue(). For those of us, that have worked quite some time with Dynamics, we understand that this class is very central, because all physical inventory transactions are posted through this class. The behavior of auto-posting BOM’s will therefore influence all places where a physical transaction is posted.

Microsoft have created a method on the movement classes named ” canBeAutoRepAsFinished()”, that let’s them refuse this behavior on certain transaction types.

If you don’t want to wait until Microsoft fixes the feature where the warehouse dimension is inherited from parent BOM, then you do have an option to extend the class BOMReportFinish.initInventDimFromBOMRoute(), and here set the InventLocationId from the parent. Her is at least my suggestion to fix the issue in the standard code(without extension):

Here is the code for validating that warehouse storage dimension is used on the BOM-line, and sending this back to the report as finished class.

Take care and I’ve got to get back to work. When I stop rowing, the mothership just goes in circles.

Dynamics 365 F&O – Selecting the correct Tier level on your sandboxes

When purchasing Dynamics 365 F&O, you a get of Microsoft managed (but self-service) environments that is included with the standard offer. (Production, Tier-2 Standard Acceptance Testing and a Tier-1 Develop/Build and test environment. Microsoft have described this on the environment planning docs. I will not discuss Tier-1 environments here, as these environments is optimized for development experiences. Do not perform performance testing on a tier-1 environment.Tier-2+ environments is based on the same architecture as a production environment and uses the Azure SQL Database service.

When running an implementation project, it is common to purchase additional tier 2+ environment that is used of different purposes as shown in the table below (from Microsoft Docs)

Selecting the correct level is important and is depending on what the environment is going to be used for. As a guidance, Microsoft have the following baseline recommendation:

On the projects where I have been involved, we most often have 3 or 4 Tier 2+ environment and the purpose are changed through the project.

The flow of data between these environments can be included into a Sprint Cycle. The process will start with defining the general parameters in the golden configuration environment (1). Here all system setup, number sequences, and master data will be uploaded/entered from the legacy systems. The Test/Stage/Migration environment (2) will be created based on the golden environment + transactional data packages/initial startup data. Then there will be a database refresh from Test (2) à UAT (2), where all test scripts will be run and approved. The results and configuration changes/master data are then fed into the golden environment ready for the next data movement cycle. The reason why we do this, is to ensure that the golden environment and the migration environment is not corrupted through testing. At Go Live, and when the UAT is approved (after a few iterations), then the Migration environment will be copied to the production environment. This can only happen once. Subsequent updates to the production environment must be done manually or using data packages.

(1)- Tier-2 Golden environment (before PROD have been deployed). This environment is often changed to become staging environment that contains an exact replica of the production environment. I prefer golden environments as a Tier-2, as this simplifies the transfer of data using the LCS self-service database refresh.

(2)- Tier-2 data migration. This environment is used for making transactional data ready for being imported to the production environment at Go-Live.

(3)- Tier-2/3 User acceptance. Here the system is really tested. Lot’s of regression testing and running test scripts. The focus is functionality. If there are concerns on performance, a Tier-5 environment can be purchased for a shorter period to validate that system can handle the full load of a large-scale production environment. For performance testing, it is recommended to also invest in automation of the test script. (Unless you ask the entire organization to participate in a manual test).

The performance of a system is a combination of the raw computing power of the VM’s hosing the AOS, and the sizing of the Azure SQL. With Dynamics 365 we don’t have any way’s of influencing the sizing of this. It is all managed by Microsoft, and they will size the production environment according to number of users and transactions per hour. But the Azure SQL boundaries that Microsoft is most often related to the following sizing steps.

I don’t exactly understand how Microsoft is mapping the Tier-2..5 towards these steps, but I have experienced that a Tier-2 level in some cases are a P1, P2, P4 and P6. More information on the DTU capacity can be found here, and the summary is that we can expect 48 IOPS per DTU. So, a P6 will provide 48000 IOPS. If you want to check your DTP limit, then open SQL manager towards the Azure SQL database, and execute the following script:

SELECT
*
FROM
sys.dm_db_resource_stats ORDER
BY end_time DESC;

And then the DTU limit should be shown here: This is from a Tier-2 environment belonging to the initial subscription, and this seams to have 250 DTU’s(P2)

But what puzzles me is if I go into another Tier-2 add-on environment I have 500 DTU (P4)

And in the third Tier-2 add-on environment I have 1000 DTU (P6)

So there seams not to be a consistency between the DTU’s provided and the Tier-2 add-on purchased. As far as I know, in this case the production environment is 1000 DTU’s(Or P6) in some of my customers.

The AOS’es on the Tier-2 environment seams to mostly be D12/DS12/DS12_v2 with 4 CPU and 28 Gb RAM and 8x500Gb storage, capable of giving out 12.800 IOPS.

What also puzzles me is the number of Tier-2 AOS’s that is deployed. Some environments have one AOS, and one BI server.

While other Tier-2 environments have two AOS’es and one BI server

I assume that the differences are related to how the subscription estimator have been filled out, and that this may have an impact on what is deployed as sandbox Tier-2 environments.

Dynamics 365 do have some performance indicators under the system administrator menu, that gives some numbers, but I cannot see a clear correlation between the environments and the performance. Maybe some of you smart guys can explain how to interpret these performance test results? What is good, and what is not?

If we take the “LargeBufferReads”, how does your environments perform?

Dynamics 365F&O – Enabling new hidden functionality (SYSFlighting)

With Dynamics 365 version 10, the innovation wave from Microsoft is continuing to accelerate. All customer will use the same base source code of the Dynamics 365 solution, and it will be maintained and updated every month. But for many customers, stability also have its value. New functionality every month is not always what existing customers want to implement. New functionality could mean new trainings and new testing. Me on the other hand loves new features, because it enables new possibilities and solutions.

Microsoft have a solution for this, and that not all new functionality is enabled by default. Instead, the new functionality must be manually enabled based on support request through LCS. Two specific functionalities that is already documented is new functionality in Data Management framework and Business events. In the documentation pages you can see how to enable this hidden functionality, but the essence is that you have to run a SQL commend (only available for non-production environments) :

INSERT INTO SYSFLIGHTING (FLIGHTNAME, ENABLED, FLIGHTSERVICEID) VALUES (‘XXXXX’, 1, 12719367)

PS! This is NOT something you can enable by your self in a production system.

A small tip, to search for in Docs.microsoft.com is the term “SYSFLIGHTING“. And then you will see the articles on documented hidden features.

But there are more, but undocumented features in two categories; Application and Platform. And these can be seen as two macro’s in the source code, named ApplicationPlatformFlights and ApplicationFoundationFlights. I have taken a snapshot of them here and based on the names we do get some indication of what they are used for. What they are, and how to use them I expect will be documented in the future.

PS! I look forward in exploring the “AnalyticsRealTimeReporting“, “DMFEnableAllCompanyExport“, “AnalyticsReportWebEditor“, “BusinessEventsMaster“, “ApplicationPlatformPowerAppsPersonalization“.

Happy Flighting

Near real-time replenishment in Dynamics 365 F&O

There is a lot of good stuff on the horizon for Dynamics 365. I highly recommend that you check out the following article of some new planning services that will come in the April 2019 release.

https://docs.microsoft.com/en-gb/business-applications-release-notes/April19/dynamics365-finance-operations/planning-service

To make this happen, I would expect the planning to go deeper into the SQL stack, and also to maximize the utilization of in-memory processing of the transactions.

For Retailers, this will be highly appreciated, where limited space in the stores means that shelf replenishment several times each day is common. Especially for perishable products with limited shelf-time. Keeping things fresh and presentable is a necessity for the customer to buy. The ability to more quickly react to customer demands ensures that the customers actually find the products in your store. And the same aspect, when there are a slower sale, the ability to adjust down the replenishment according to activity. This saves cost and increases profit. In Retail, it is the small improvements that in sum creates the big results.

For the planning service to work, it needs the transactions to take action on. In Dynamics 365 for Retail we must choose between the ability to aggregate the transactions coming from the POS/Channel databases, or more quickly posting the statements. I’m looking forward to many good discussions on this area.

The future is faster

Retail Enterprise Architecture mapping using ArchiMate and ARDOQ

The warning; The blog post is High Level, but the benefits can be mind-blowing.

Enterprise Architecture is about understanding and change. In today’s business, change is everywhere and the essential part to survive. But change is not easy. To have insights and understanding of your own organization is essential for change and risk assessment. Understanding how people, processes and technology are connected will give focus to achieve high value benefits. In my profession we use the Microsoft Dynamics technology stack as a main driver for implementing improvements. But we also acknowledge that Dynamics 365 is not the only system at work. Even though Dynamics 365 is a central component, there always will be many other systems, processes and technologies that is included in the enterprise architecture (EA). We need a way to describe all these connections in uniformed way, that allows us to communicate a model for enterprises dynamically.

But why should EA mapping be a central part of your business? here are 6 business motivators and benefits of having a structured approach of the EA mapping:

Increased stability and availability. It is critical vital that all central systems have a near 100% availability. POS and back-end systems must always work, and the supporting processes must be streamlined to secure that risks related to business improvements and changes are minimized and understood. The EA mapping documents the relationships and show consequences changes.
Guaranteed Performance. Having acceptable system response 24/7, that can deal with business pikes must be planned and built around the system. Systems must deal with a variable load, handling that the sudden event changes the transaction volume. Any disruptions quickly result in customers walking away. The EA mapping must document components central for performance compliance, and the business actors involved
Scalable capacity. New stores or changes in the business model can quickly change the requirement for transaction and processing capacity. To be cost effective, the capacity scalability must dynamic according to the actual need. Both in terms to scaling up and down. The EA mapping documents components central for scalability, and the business actors involved.
Strong security. Cyberattacks are increasing and it is vital important to secure information and transactions. Being GDPR compliant puts demands on systems and internal processes on how to handle own and customer information. Security, tractability and audit trail builds trust into the system and documenting compliancy. The EA mapping documents governance and role compliance, and the business actors involved.
Right focus. There are always new business opportunities and process improvements. Keeping track on where to focus will lead to better and faster implementation of changes in a secure and stable manner. New ideas must be analyzed, and risk assessed, and also to understand the implications. The EA mapping can assist in focusing on what changes have the highest priorities and benefits.
Cost control. Being a retailer involves large investments in technology like POS, Mobile apps, customer portals and enterprise systems. Moreover, there may be large fluctuations in system usage throughout the year. By purchasing these features in the subscription form, it is possible to equalize the operating costs and that you only pay for what is needed. Good liquidity is archived by balancing cost full investments towards the revenue stream and securing actual return on these investments

To move forward a “language” is needed to describe an enterprise architecture model where you can visualize, plan, implement and maintain all relationships that exists today, in transitions and the final vision.

Architecture Layers using ArchiMate

The overall mapping can be modelled in 5 main layers; Here I would like to focus on the symbolism used for identifying. The notation here is ArchiMate, that is open and independent enterprise architecture modeling language to support the description, analysis and visualization of architecture within and across business domains in an unambiguous way.

Motivation Elements defines the overall drivers and goals that the enterprise have. Much of the vision is located here. The Motivation elements can also be seen as a vertical layer, in close relationship to all layers.

The Strategy layer defines the overall course of action and a mapping towards resource and business capabilities.


The Business layer defines the business processes and the services the enterprise is providing, and the here the main business processes are defined. To simply the modeling it is relevant to start with the Business Objects, Business processes, Business Roles, Business actors, Business events, Business Services and Business Rules and Logics.

The Application layer contains application services and capabilities, their interactions and application processes. Here Dynamics 365 and much of the power platform is located. To simply the modeling it is relevant to start with Data objects, Application functions and Application components.


The Technology and physical layer describes the software and hardware(physical or virtual) capabilities that are required to support the deployment of business, data, and application services; this includes IT infrastructure, middleware, networks, communications, processing, standards, etc. The underlaying structure of Microsoft Azure would typically be described here. To simply the modeling it is relevant to start with Artifacts, System Software, Technology Service, Device and Communication network.

Architecture Relationships using ArchiMate

The real beauty comes, when the relationships between architecture elements are being defined. But to do this, a set of predefined relationships needs to be defined. The most common used is the following one

If putting this together in a combined setup I get the following relationship diagram of what is relevant to document.

(*Credits to Joon for this visualization)

As seen here, the business processes are a realization of the application functions, and this clarifies how a proper Enterprise Architecture modelling is documents. With this model, we can what business actors is assigned to what Business roles. This again shows the business process assignment to the role. The Business processes are there to realize business services.

Building the Architecture model using Ardoq

The architecture relationships can be challenging to describe using tools like Visio. Often, we see that great work is done, but not used to the potential. An alternative is to use cloud based mapping tools as ardoq, that covers most aspects in documenting relationships between business processes, applications, roles, risks and transitions. This is not a commercial for this tool, but I find it great. So, I decided to try to use Ardoq to model the Contoso demo data.

Here I will focus on the Application Layer, as this is the layer where the application functionality and data are located. First, I create the application components:

Then I create the Application Functions, and I also import the Business Roles that is available in the Contoso demo dataset.

Next job is to build the relationship between the application functions(D365), business processes(vertical processes) and business roles. This will allow me to visualize and to trace dependencies across all the EA mappings. Let’s take an example looking into the responsibilities of an employee named April Mayer.

I can here see that she is related to the business roles; Accounts payable clerk and manager. If I click on the “Accounts payable clerk” I jump into the view of this business role, and I can see that it is related to the business processes of accounts payable, and an association to April Mayer.

Jumping to accounts payable allows be to see the business processes involved.

I can also visualize the entire Enterprise Architecture Map will all objects and relations,

And zoom into specific on the relations; This graph shows me that April Meyer belongs to the role “Employee”, Accounts payable manager and clear. The Accounts payable clerk is associated with the business process “Accounts payable”. The clerk role is associated with the Financial management modules in Dynamics 365.

Here is another visualization, that shows the how the business objective of “Marketing” can be achieved, and what Business roles are involved, what Business processes, Application functions and what application components are also involved.

Knowing the relation and the ability to communicate is a key to happy Enterprise Architecture mapping.

Give is a try, the result can be very powerful.

Additional information

1. A high value blogger on Enterprise Architecture is http://theenterprisingarchitect.blogspot.com/.

2. Homepage of archimate: http://pubs.opengroup.org/architecture/archimate3-doc/toc.html .

3. Homepage of ARDOQ : https://ardoq.com/ Give it a try !

MPOS – Open full (kiosk) screen mode when having dual display

For a retailer, every saved “click” is appreciated, and the ability to remove any noise appreciated.

When starting MPOS in maximum mode, you will often see that you have a title bar at the top, and the app-bar at the bottom.

In windows 10 you can also use the “tablet-mode” to get the MPOS into full screen mode.

BUT! If you have a dual display setup, it the tablet mode does not work.

If you want to remove them, there is a smart keyboard short-cut:

Shift-Windows-Enter

This will put the MPOS in full screen mode, and giving a nicer appearance without the bar’s.

Then the questions is how to make this always happen, when starting the MPOS ? This was actually not a easy task, but a colleague of me (Espen) made it possible , du using a powershell script.

The following page contains a small powershell script, that opens a UWP app in full (kiosk) screen mode:

Add this to a “start up folder”, and create a new powershell script containing ;

[Path]\StartUWPAppFullScreen.ps1
-app
Shell:Appsfolder\Microsoft.Dynamics.Retail.Pos_tfm0as0j1fqzt!App

 

Then create a shortcut towards this new powershell app.

How initial investigations (by Sven Erik) shows that the MPOS app ID is Microsoft.Dynamics.Retail.Pos_tfm0as0j1fqzt!App and let’s hope this ID stay’s permanent.

Then the MPOS looks nicer for the user, without noice.