Published!

Well, it finally happened…..

The Dynamics 365 for Financials extension (or app…..your choice) that I’ve been working on has finally made it to AppSource! You can check out our listing here.

untitled

BuildFood – Recipes is the first extension from IndustryBuilt Software Corp., who also happen to make JustFood. The extension focuses on the needs of the small bakeries out there, and as the marketing gurus say, it can

“manage recipes, create ingredient declarations, track allergens and calculate nutrients.”

With the extension being validated back in November, it has been a somewhat lengthy wait before seeing it published, but it’s awesome to see it available now! When we first formed the “extension team” as it was first referred, we weren’t sure what to expect from this “new way” of building solutions, and it became evident early on that we needed to tackle everything (marketing, product design, development) with fresh eyes and a new point of view. I think everyone involved has done a fantastic job of that if I do say so!

So……we’re published. Cool….but we are not stopping yet! We’re not too far from submitting the next version of BuildFood – Recipes to AppSource so stay tuned for that! Some great new features coming in the next version! We’re also working on our second extension, but I’m not giving away any details on that until marketing has their chance to let loose with it. 🙂

Oh, if you want to know more about BuildFood, click here!

Happy coding…

 

Back from Copenhagen…

I’m writing this on the plane heading back to Toronto after spending a few days at the Microsoft Development Center in Copenhagen (great building!!). I was participating in a set of meetings around how to wow the Dynamics 365 for Financials customer.

It’s all about the customer experience, or the journey if you will. From the time they select and install an extension, the customer needs to have an experience that makes them want to continue, and makes them want to register and purchase your extension. Let’s face it, first impressions are huge, especially in a SaaS world where choice is king. If a customer needs to jump through hoops to get your extension setup before they can even try it out, chances are they’re going to move on.

While I can’t get into the details as they are yet to be made public, what I can say is that it was great for IndustryBuilt Software Corp. to be included in the select group of partners that were chosen to participate alongside some key Microsoft resources, in order to help define the standards that all partners can (and I hope will!) adopt in order to make their extensions great. A ton of ideas were discussed and everyone came away from the meetings with new information on how to not only improve their own extensions, but ways in which we can create tools and samples that other partners can use. Can’t wait to see all of the final products!

As an added bonus, I spent a bit of time playing with extensions v2, which I’ve been wanting to do for a while now. I even begin converting my existing v1 extension into a v2 extension, and conversion process is slick. There’s always clean up to be done after any conversion tool, but it gets you close! The tool is not available yet so I’m not spilling any beans on it now, but I’ll be working with Microsoft to resolve some of the issues that I did encounter, so perhaps I can share more information later.

That’s it for now, and as I said, more information will come on this when it has been made public, but for now, rest assured there is a strong dedication and commitment from Microsoft on ensuring that whether the customer is new to ERP or they’re a seasoned veteran, their software experience will be fantastic!

NAV Development Preview – February Update is Here!

If you are a Dynamics NAV developer you should hopefully have heard by now of the upcoming changes to the development environment for building extensions.

If you’ve not heard about this, read about it here. In short…Visual Studio Code! Oh….and if that isn’t enough, we’re getting an in-client visual designer as well!

Unfortunately I’ve not had as much time to play with it as I would have liked. I am hoping to change that in the next few weeks. From what I’ve seen though, I cannot wait to start using it on a daily basis!

The team at Microsoft has been doing a great job delivering updates since the initial preview release in December. Check out the latest release notes here and try it out if you can!

Find Out if an Extension is Installed

EDIT: I’ve just been informed that users will not have access to the “NAV App Installed App” system table in the near future, so while the following will work for a typical NAV 2017 installation, it will not work for a Dynamics 365 extension.

EDIT2: I’ve posted a much better solution here!!

Having already created and published one extension, I am now in the process of creating a second extension, and in some cases, I want my extensions to act differently depending on if the other extension is installed or not. I could easily make each extension dependent on each other so that I know they’re always both installed, but where’s the fun in that!!??

You can do this by using the NAV App Installed App system table (2000000153). This table lists all of the extensions that are installed within the tenant.

Now, before I go further, I will mention that there is a function named IsInstalled in Codeunit 2500 (NavExtensionInstallationMgmt) that you could call, but this function accepts a Package ID, which is different than the Application ID of the extension. I prefer to use the Application ID, as I am in control of what that value is through the extension packaging process, and I like that control. So……because of this, I am not going to use the built-in function.

Here’s what you need to do:

First, create a local function that returns true/false depending on if a given Application ID is installed or not.

LOCAL CheckIfExtensionInstalled(AppID : GUID) : Boolean
EXIT(NAVAppInstalledApp.GET(AppID));

Next, we need to write local functions to return our extension Application IDs. You can get the GUID from the extension manifest file when you build the NAVX file. Repeat this process and create a function for each extension that you want to see if it’s installed.

LOCAL GetExtension1AppID() : GUID
//-- AppID: GUID
EVALUATE(AppID,'e7deb9a9-6727-4157-838e-bcf4a0853942');
EXIT(AppID);

Finally…….create a global function that will check for each extension. We will call this function from throughout our application wherever we need our application to act accordingly.

Extension1IsInstalled() : Boolean
EXIT(CheckIfExtensionInstalled(GetExtension1AppID));

Now, all we need to do is use the functionality in our code, such as the following example:

IF Extension1IsInstalled THEN BEGIN
  //-- do something
END ELSE BEGIN
  //-- do something else
END;

One thing to note, you will probably also need to give your codeunit (or whatever object you added the above functions to) permissions to read the NAV App Installed App table as the average user does not typically have this permission.

Rebrand your Web Client

If you are working with Dynamics 365 for Financials, when it comes time to submitting your extension to AppSource, you need to supply some marketing materials, for examples walkthroughs and videos.

As the only option right now is to use the Dynamics NAV 2017 Web Client for testing (no Dynamics 365 sandbox…yet!), it can be a pain that the title ribbon in the Web Client says Dynamics NAV. When submitting to AppSource, there can be no trace of NAV in any of your marketing materials.

But with a small change to your Web Client url, you can change that title ribbon from this…

navribbon

to this…

d365ribbon

You do this by simply adding the following parameter to the end of the url:

?aid=fin

Example:

http://localhost:8080/DynamicsNAV100/WebClient/?aid=fin

That’s it! Bookmark both versions of the url to easily switch between a NAV demo and a Dynamics 365 demo!

Determining the right client

In certain scenarios, it may be important to know what client that the user is working in. Perhaps you have an action that doesn’t work in the Web Client, or maybe you have some code that interacts with a device camera that only works in the Device Client. Or maybe you want to send a link to your users that allows them to open a record, and we want to make sure the link is for the correct client?

First, I want to be clear that what I am describing here is based on the Dynamics NAV 2017 platform. Yes, this means the Dynamics 365 for Financials platform falls under this umbrella as well. Perhaps bits and pieces are supported on older platforms, but my intention is to never look backwards and keep this train moving forward!

Now to it…

There are some system variables that we need to get familiar with:

  • CLIENTTYPE
    • an option variable that contains the various client types:
      • Windows
      • Web
      • SOAP
      • OData
      • NAS
      • Background
      • Management
      • Tablet
      • Phone
      • Desktop
      • ODataV4
  • CURRENTCLIENTTYPE
    • Returns the client type that is currently executing the code.
  • DEFAULTCLIENTTYPE
    • Returns the default client type, as defined in the Dynamics NAV Server configuration. For more information click here.

Example 1: Show an action only in the Windows Client.

  • In the Development Environment, design the page that contains the action.
  • Make sure that the action does something. If it does not do anything, then it will always be hidden. For testing purposes you can add the following code to the onAction trigger for the action:
MESSAGE('A message for testing');
  • Add a global Boolean variable named ‘showMyAction’:

globalvariable

  • Assign the global variable to the Visible property of the action that you wish to conditional show/hide (you can show this property as a column in the Action Designer now!!):

actiondesigner

  • Add the following code to the onOpenPage trigger:
showMyAction := CURRENTCLIENTTYPE = CLIENTTYPE::Windows;
  • Close, save and compile your page.
  • If you run the page in the Web Client for example, you will not see the action on the ribbon of the page. Running the page from the Windows Client will show the action.

Example 2: Create a url that takes a user to the first customer record.

  • In the Development Environment, create a new codeunit.
  • In the onRun trigger, create the following local variables:

capture-globalvariables

  • In the onRun trigger, add the following code:
Customer.FINDFIRST;
url := GETURL(DEFAULTCLIENTTYPE,COMPANYNAME,OBJECTTYPE::Page,PAGE::"Customer Card",Customer);
MESSAGE(url);
  • Close, save and compile the codeunit.
  • From the Development Environment run the codeunit. A message should appear on screen with the url that was generated. In the example below, my default client was set to be the Web Client.
http://localhost:8080/DynamicsNAV100/WebClient?company=CRONUS%20USA&page=21&bookmark=27%3bEgAAAAJ7CDAAMQAxADIAMQAyADEAMg%3d%3d

Hopefully you get a sense now of how you can condition your code based on the different Dynamics NAV client types.

That’s all for today!

A promise of sorts

Well, I’ve not exactly been very active with this site. A smattering of posts over the years, but nothing too consistent.

I am putting up this post to hopefully energize myself into committing to putting up more posts on a more frequent basis.

You see, while I am a developer at heart, I only recently got back into development full time, and it is amazing!! So amazing, that I have been going full steam ahead not looking up from it.

What am I doing? Well…….I’ve climbed aboard the Dynamics 365 for Financials train, and I’ve been busily building an app (or two!) that at this time, has been validated by Microsoft and is just waiting to be deployed to AppSource.

So, back to the point. I am going to try and do better here. I have learned a lot of information that I have found is not as easy to come by as it probably should be, especially being an early adopter that’s moving full steam ahead with NAV extensions. My goal is to be able to put up little tidbits (and bytes! haha, see what I did there?) of things I come across so that perhaps it’s not as hard for the next developer to get this information.

We’ll see how it goes….