Repair Companion Tables

One of my clients has been seeing these weird data issues when migrating databases to the cloud. The most important purpose of this post is to point out a handy data tool that is buried deep in the application, read on to learn what I am talking about.

The problems that my client is experiencing mostly have to do with various ways in which they get data from OnPrem to the cloud. One way is to use the cloud migration tools, another is configuration packages. In addition to using different tools, it feels like there may be some issues with the BC platform’s capability to properly manage data in table extensions. I’ll tell you why I think that.

Missing Data

The first indication was a problem where invoices were migrated into the cloud. The migration process seems to have completed, and the posted invoice list shows a list of invoices. The weird part is that when you try to open an invoice, it shows an empty invoice page. Click ‘View Table’ from the page inspector, and you get nothing, a list of zero records even though the posted invoice list shows the records. Go to the admin center to look at the capacity, it tells us there are like 1154 invoices but when you drill down into the number you get another empty list.

This feels very familiar to me, very much like when a lot of companies tried to migrate straight into SQL Server and we would see null field values. As we all know, BC can’t handle null values. Instead of getting an error saying ‘there are null values!! I don’t know what to do!!’ you get weird behavior like empty lists for tables that you know have plenty of records.

Solving The Problem

With the explosion of moving functionality into separate apps, I had a feeling that the problem had something to do with table extensions (which as you know have added fields in what is called ‘Companion Tables’). I had posted the question on Twitter and there were suggestions to uninstall and re-install apps. This worked sometimes but not all the time.

The original Tweet asking for help on this issue

What it feels like to me is that either there are null values in records, or maybe records are missing in companion tables altogether. We don’t have access to Azure SQL so there is no way for me to actually prove that there is an issue with table extensions. SOMETHING is wrong here though, and for the longest time the only way that I thought we could fix it was to uninstall/re-install apps until the issue was fixed. The reason why this works is that each time you install an app, it will update the schema and make sure that data integrity remains intact. In other words, it will make sure that all records in the main tables have corresponding records in all companion tables.

And then I became aware of a VERY handy little tool. This tool is not available when you are working in local containers, but when you are in a cloud tenant, you will have access to it. I’m talking about the “Repair Companion Table Records” process in the “Cloud Migration Management” page.

The tool will go through all tables that have table extensions, and make sure that each record in extended tables has a corresponding record in each companion table. I still can’t prove my theory but I do know that running this process fixed the problem for my client.

Excel Buffer for the Cloud

One of my clients asked me to help them convert an add-on that they developed in C/CIDE into an AppSource app. This add-on includes the functionality to export some data into an Excel file, using the Excel Buffer table.

The Excel Buffer table is also available in AL, but one of the issues is that as soon as you set the target of the extension to ‘Cloud’ (Which as you know is an attribute in app.json), the compiler will scream at you that you can’t use certain functions of the Excel Buffer, because their Scope has been set to on premises. So if your C/AL object uses the ‘OpenExcel’ function, for instance, you can’t use that for AppSource apps because its scope is OnPrem. This type of thing usually takes me days to figure out, so I thought I’d ask Twitter with my favorite community hashtag #bcalhelp

Within a day I received a bunch of helpful suggestions, I just love this community! The one that put me over the top was a phone call with my good friend AJ, who not only showed me, but he also sent me some sample code that he was working on. He’s working on a blog post about this topic himself, so I’ll let him share that and I’ll post a link to his blog once he puts it online. I want to mention Owen too because he had sent me essentially the same suggestions, but to an email address that I hardly ever use anymore, so I didn’t see that until days later.

As you can see by the trigger name, I had to put this into a report object (which I’ll share when I find time to put it in a repo). My main problem was that I needed to be able to provide a way for the user to open the Excel file. For this to work, you use the OpenExcel function. This actually does not open Excel, but what it does instead is it downloads the Excel file into the Downloads folder on your computer, and then you can open that file from there.

Some additional pointers:

  • CreateNewBook creates a new file, with a new sheet. If you already have the file created, and you need to add a sheet to the existing file, then you would use the SelectOrAddSheet function
  • TheWriteSheet function writes the records from the Excel Buffer table into the sheet. Each record represents a cell value
  • You will need to use the NewRow, AddColumn functions to ‘walk the grid’ of the cells in your sheet. Also very useful functions: ClearNewRow and SetCurrent. I ended up adding a GetCurrentRow function to an Excel Buffer table extension
  • The CurrentRow and CurrentCol variables in the Excel Buffer table are your friend. Forget about the letter/numbers of the Excel file itself, just use the row/column numbers
  • SetFriendlyFileName is not mandatory, but otherwise the file will be called ‘Book1’ or something

Like I said before, AJ is working on a post for this as well, and he said he was going to offer a repo with the objects as well. If I don’t forget I’ll create a sample report and offer that as a PR to AJ’s Excel repo.

AppSource Test Drive

Everybody knows about AppSource by now. Everybody is also struggling how to make AppSource work for them, and especially how to provide customers and prospects a trial of their functionality. You could create a sandbox environment and try things out in there, but that doesn’t have test data that is specific for your product. You could install the product into a production tenant, but then you have an app in there that you might not want after all.

One of the lesser known features of AppSource is the Test Drive. This feature provides an ISV partner a completely isolated trial experience  of their product, in an environment that is completely in their control. What’s even better is that the Test Drive can be done in a number of different ways, so you can tailor it exactly to your requirements.

The Test Drive can be a part of a comprehensive marketing strategy, in which you can implement an environment that can showcase even the most complex features of your software, in a way that provides ample opportunity to your customers to learn how to use your product in a non-production environment that is still in the cloud, without having to get a team of consultants onsite.

The way that it works is essentially that the Test Drive is a standalone tenant that has a template company. This template company has your product already installed, and it has proper test data already populated. You can create all the data that you need for your product to run properly. Then, through the SaaSification techniques, you would implement a path into the features of your product, taking the user into your product one step at a time.

If you are interested in providing a Test Drive, please watch this video, in which I go into some more detail about this feature.

To find out more about the test drive, and other information about apps for Business Central, visit http://aka.ms/ReadyToGo

Inspire 2018 Recap

One of the cool things about the Microsoft Inspire event is that IT. IS. HUUUUGE! One of the most annoying things about Inspire is that it is HUUUGE! It is so easy to get lost among the 10,000 or so attendees that are milling about, going to sessions across a bunch of floors, walking around the immense expo floor with what seems to be thousands upon thousands of vendors peddling their wares.

The best part about this event was that it was in Vegas. Not that I particularly enjoy Vegas, but it is a drive away from my house. This means that I got to leave at a convenient time, drive my own car, and bring a guitar with me so that I can play in my hotel room.

Two of my partners made the trip from Europe, and we had a bunch of meetings scheduled with some potential and existing customers. It is always nice to spend some time with them, we had great food, saw some cool things. I was looking forward to going to the Bruno Mars concert at the big event, but the night in question was hotter than hell, and there was no way I was going to go out in that temperature. Bruno will have to wait to have me in his audience at a later date 🙂

So…. what was the buzz around Inspire this year? For me it was a further crystallization of Microsoft’s digital transformation strategy. The marketing heads have come up with something called ‘Intelligent Edge’ which is a way to categorize everything into a big connected amalgamation of connected technologies. There were many slides about machine learning, AI, a BIG emphasis on Azure. All of this with unlimited scalability in the Microsoft Cloud, which comes with an incremental subscription fee of course.

Microsoft seems to realize that they need the partner channel to do most of the selling for them, so the way they organize that has gone through some further evolving. It’s still very shortly after the event so I haven’t had much time to let this stew and find some good resources. I’m actually not sure if I will have much time for that anyway. I am knee deep in working on hours of new training material that needs to be finished before the next event, so we’ll see if I get to do some research on all of this.

For me, I like to dive a little deeper into specific topics. Inspire is a bit overwhelming for me, and it is an extremely expensive event to boot. We’ve been to Inspire two years in a row, and if we’ll come back next year (which I doubt) we will probably just get a room near the conference and use the event as a means to be in one place with our customers and Microsoft people.

Image: a slide showing the Intelligent Edge

Microsoft 365 Business Central

For about a year now, we have been talking about “Tenerife”. Despite going to great lengths to calm down the partner channel, the name and what it stood for has caused massive misunderstandings and great anxiety. Hopefully that anxiety will come to an end because today the new name has been announced: Microsoft Dynamics 365 Business Central (click here for the announcement and click here for the overview page). A catchy, easy-to-pronounce, 14 syllable name, and it is scheduled to be released on April 2, 2018.

I just wanted to put this out there, and I don’t have a ton of things to say right now, but watch this space for much more stuff to come. This week is Directions Asia in Bangkok, and there will be plenty of information coming out of that event. With the release of the new product there will be some new requirements for partners to get their IP into AppSource, and I will have plenty of things to share about that. Microsoft is working incredibly hard on getting all the information out there, including new material in the learning portal (the link that I had wasn’t working when I wrote this, so I owe you that one) and a ton of new and updated content in the new technical documentation site called ‘docs’.

I am in a very fortunate position to be involved in the very early stages of Business Central, I’ve had the pleasure to be working with the new product for a while now. I have to say I was skeptical of the Web Client and having everything in the cloud, but as I’ve gotten used to how it all works, and how the new ecosystem is forcing to improve our internal processes, I can’t help but be happy about the way that my industry is taking me into a more professional approach to my business. No longer do we get away with flying by the seat of our pants, and do whatever we can get out there in a short term, quick and dirty way. We must adapt and get ALL of our ducks in a row. Our approach to design, architecture, coding, marketing, delivery, automated testing, EVERYTHING must be in top shape in order to be successful in the new age.

This is the time where you have to adapt, or be disrupted. For me personally, it scares the heck out of me, but I also welcome the challenge. I am looking forward to what is to come next, I hope you are too.

CRS is an ISV Development Center

After months of intense scrutiny by Microsoft, and after having kept this quiet for a while once we knew that we were going to be accepted, we’ve finally come to the announcement part at the Microsoft Inspire conference that was held this week in Washington DC. I am very proud to say that we are one of only a handful of companies that have Microsoft’s trust to be a partner to their ISV partner channel.

My company, Cloud Ready Software, is one of only 7 companies globally to be selected in the initial group of ISV Development Centers, of which only 4 have a real competency in Dynamics NAV and Dynamics 365 for Finance and Operations Business Edition.

The program was founded by Microsoft to be a buffer for getting the ISV partner channel’s IP into the cloud. There is only a small number of companies worldwide in the Dynamics 365 area that really focus on building products for the cloud. Cloud Ready Software had been helping partners develop their products for the cloud for years, and we have held countless workshops to teach the partner channel about the latest technologies. It seemed like a great fit for us to apply for the program, and we are very excited about the prospect of making this our niche.

Essentially, our job is to help ISV partners in any way we can to get their IP into the cloud. We can do workshops and training for their staff, but we can also participate in projects directly. We can be a way to extend bandwidth in analysis, design, or development efforts, and we can also help with project management and/or guidance in any capacity necessary.

As an ISV Development Center, we have access to the latest technologies, and we are actively involved in developing and promoting those technologies into the partner channel. We can even help be part of a proof of concept to prove the viability of new technologies in cutting edge projects.

It is important to note that we are the partner’s partner. We are not after end users, in fact one of the stipulations of being in the IAV Development Center program is that we are not allowed to work directly with the end user without prior authorization by the partner. Should an end user company contact us, we are obligated to get in touch with their partner of record, to make sure that there is no conflict of interest.

 

The Microsoft Cloud

When I hear people talk about ‘the cloud’, I sometimes wonder if they really know what they’re talking about. For sure when I hear the sales pitch of “NAV in the cloud”, the hairs at the back of my neck stand up, because I know a bunch of different ways that you could interpret that. Are you implementing NAV in a virtual machine that is hosted online? Are you providing a managed service? Soon it might mean a Dynamics 365 implementation. Not to mention how many companies almost seem to gleefully try to confuse you even further when they talk about the cloud.

A few years back I was attending a Microsoft presentation, and they were showing us their plans to build some brand new data centers all over the globe. As they were talking about those data centers, it dawned on me…. The cloud is nothing more than buying processing power from some provider or other. Microsoft has their Azure platform, Google and Amazon have theirs, but all that “the cloud” means is that those providers charge you for the computing power to provide those services.

I was reminded of that presentation when I saw this video in my Twitter feed. Have a look and see if you find it as fascinating as I do.