Working with optional NAV table fields

Now that we have entered the Extension era we must take into account that some extensions may or may not be installed at the time of code execution.

You might even have two Extensions that you would like to share data.

Let’s give an example.

In Iceland we add a new field to the Customer table (18).  That field is named “Registration No.” and is being used for a 10 digit number that is unique for the individual or the company we add as a customer to your system.

My Example Extension can support Icelandic Registration No. if it exists.

Using Codeunit 701, “Data Type Management”, Record Reference and Field Reference we can form the following code.

Let’s walk through this code…

GetRecordRef will populate the record reference (RecRef) for the given table and return TRUE if successful.
FindFieldByName will populate the field reference (FltRef) for the given record reference and field name and return TRUE if successful.

Call this function with a code like this.

We could create a more generic function.

This function can be used in more generic ways, like

See where I am going with this?

So the other way around…

And using this with

More generic versions can be something like this.

To use these functions we first need to copy our record to a variant variable and then back to the record after the function completes.

Or

I have requested Microsoft to add more generic functions to Codeunit 701, “Data Type Management”.  I trust that they will deliver as usual.

That NAV Codeunit is one of my favorite ones delivered by Microsoft.

My first Dynamics 365 Extension – Offer ‘G/L Source Names’ is live

So, back from summer vacation and time to blog…

Early this month I got this email:

Offer ‘G/L Source Names’ is live

Congratulations! Your offer ‘G/L Source Names’ has been successfully published and is available publicly.

Next Steps

Below are the published link(s) for this offer. Please use these to verify and validate end to end experience.

Microsoft AppSource

If you need to update your offer click here.

Reply all to this email in case you need any help.

Thank you,
Microsoft AppSource team

If you follow these links you should see that the publishing portal for Dynamics 365 AppSource has been changed.

My App was automatically migrated from Azure MarketPlace to Cloud Partner Portal.  Got this email from Microsoft:

Greetings,

Azure Marketplace will be migrating your VM offers to the Cloud Partner Portal – the new and improved portal for publishing your single VM offers and getting valuable insights about your Azure Marketplace business, on Monday, 17th July 2017.

What should you expect during migration?

Migration will be done by Azure marketplace team and there is no action needed from you. Post-migration, you will start managing your single VM offers in the new Cloud Partner Portal.

During the migration, you will be unable to make updates to your offers via the publishing portal. Migration will be completed on the same day.

Will my offer be available on Azure Marketplace during migration?

Yes, migration will not affect your Azure Marketplace listing.

Refer to migration documentation here for FAQs.

You can log in to the Cloud Partner Portal at https://cloudpartner.azure.com. Documentation about the Cloud Partner Portal and publishing single VM offers can be found here.

General questions on the new CPP itself, reach out to cpp-public-preview@microsoft.com and we will follow up with you! If you have specific D365 questions, reach out to d365val@microsoft.com

Regards,
Azure Marketplace Team

And that is not all.  I also got this email from Microsoft:

Hello,

The Dynamics 365 for Financials Extension Team wants to inform you of some important information. As of August 1st, 2017, we will begin accepting version 2.0 extensions for validation. Version 2.0 extensions is a much improved experience and represent our future direction for extensions. We will continue to accept v1 extensions until October 1. Please plan accordingly.

If you have a v1 app that is currently in process of validation, or if you have one that is currently published in App Source, you can begin (at your convenience) to convert your v1 app to v2. Refer to the site here for information on how to convert your app. We will work with you as well for the conversion so please direct any questions to d365val@microsoft.com.

https://aka.ms/BeDeveloperforApps and https://aka.ms/GetStartedWithApps has all the information to date around Extensions v2.0. If there is anything you cannot find there, you can always contact the email with any further questions.

Best Regards

D365 Extension Validation Team

This blog series will be continued where I will be converting this App to Extension v2.0 using VSCode.  Stay tuned…

My first Dynamics 365 Extension – In maintenance mode

This morning I got this email:

Hi Gunnar,

I just wanted to inform you that your extension passed validation on US, CA, and GB. We will now get your extension checked in and it will go into the June (Update 7) release.

I am excited to see if users will start to install my app.  As more markets will open for Dynamics 365 for Financials (D365) I will need to support more languages to my App.

If you can help me with your local language please ping me.  The App is available on my GitHub site; https://github.com/gunnargestsson/nav2017/tree/GLSourceNames.  If you would like to install this extension or merge the deltas into your solution, again just ping me.

If you are in the process of creating an Extension for Dynamics 365 for Financials you can now request a Financials sandbox environment.  I installed this on my local virtual machine and this was an essential part of validating the extension.  You will need to sign up for the CTP program, which provides you with a prerelease version of Dynamics 365 for Financials. After you have signed the CTP Agreement, you are directed to a page that contains information about how to download the latest builds and configure a local computer or a Microsoft Azure VM for Dynamics 365 for Financials. If you have questions or feedback regarding this, please send an e-mail to: d365-smb@microsoft.com.

Also, take a look at the updated aka.ms/AppsForFinancials page for more information.

Finally, if you take a look at the source for G/L Source Names you will find a setup.json file.  This file has all the information needed for my GIT Source Control.  As promised in NAV TechDays 2016 I am releasing the AdvaniaGIT to be community project.  Stay tuned to Dynamics.is as I will be writing blogs about this project in the coming days and weeks.

 

Updates to my Object Renumbering Tool

Back in the end of 2014 I published a renumbering tool for NAV objects.  Using DotNet I was able to increase the renumbering speed for text object files dramatically.

Since then I have been asked if I could upgrade it to work with IDs and Field Numbers.

Now I have.

What’s more, it is also on GitHub.

The Process functions are the following;

  • Read Object Lines – Creates renumbering lines base on the objects in the selected object file.
  • Suggest IDs – Suggest new object numbers in the range from 50.000 based on the available objects in the current license.
  • Read from Excel – Reads object renumbering lines from Excel Sheet created with the Write to Excel process.
  • Write to Excel – Writes current renumbering lines to a new Excel Sheet to me managed within Excel and reread into the renumbering lines.
  • Renumber Using Lines – Prompts for a file to read and for a new file to save with renumbered objects based on the rules in the renumbering lines.
  • Renumber Using Controls – Prompts for a file to read and for a new file to save with renumbered objects based on the rules in the control IDs setup.

I have done some fixes to the renumbering function and have added support for the EventSubscriber.

Go to GitHub to download Page and Table 50000, try this out and submit improvements.

When I am processing an object file I have it open in my text editor.  When I see something to renumber I update the control ranges and execute the renumbering process, reading and writing to the same object file.  My editor will reload the file and I can see the results immediately.

 

My first Dynamics 365 Extension – NAV vs 365

I am now in the validation of my app.  Unfortunately I don’t have enough time to make this go any faster so please be patient.

This process will take time.  Here is an example of the expected time frame.

As you may have read in my previous post I created a few videos.  These are the first comment from Microsoft  about these videos.

The obvious information from here is that I can’t use Dynamics NAV anywhere in my Dynamics 365 for Financials extension.

I asked and this is the solution they gave me.

If you add &aid=fin to the end of your Web Client URL it will add the Dynamics 365 shell.

When I start my web client the normal Url is “http://tfw107131:8080/NAV2017DEV0000077/WebClient/”.  By adding the suggested switch to the Url and starting the web client with “http://tfw107131:8080/NAV2017DEV0000077/WebClient/?aid=fin” I will get the Dynamics 365 shell.

The parameters that are added to the Url start with a question mark (?) and after that each parameter starts with the ampersand (&).  As an example, I have opened the Customer List and the Url says: “http://tfw107131:8080/NAV2017DEV0000077/WebClient/?aid=fin&bookmark=27%3bEgAAAAJ7CDAAMQAxADIAMQAyADEAMg%3d%3d&page=22&company=CRONUS International Ltd.&dc=0”.  The parameter order does not matter, the “aid=fin” can be placed anywhere in the parameter part of the Url.

Now I am back at creating screen shots, videos and documentation.  All with the new Dynamics 365 for Financials look and feel.

My first Dynamics 365 Extension – step by step – eight step

Now we have gotten to Step 4 in the guided path Microsoft offered us on PartnerSource.

Step 4: Provide your offer information

After you have built your app, you will need to define all the attributes that will determine how your app will be listed in Microsoft AppSource. For example, your company information, your offer & plans, marketing information, support contact, and Microsoft AppSource categories.

To define the attributes, visit the Microsoft Azure Publishing Portal.

Refer to the Marketing Validation Guidance and checklist (coming soon) to get insight into the marketing requirements and recommendations.

 

 

Lets create a new Madeira offering.

Here I clicked on “Create Dev Center account and join the Azure program”.  This helped me link the development account I created in Step 2 to my Azure publishing.

Next I clicked on “Tell us about your company” and typed away.

Next step to describe my Extension.

Here we need a lot of information.  You can see the asterisk fields that are required.

In the Plan I just created a default plan.  There will be support for more later on.

Marketing, also a generic identifier.

Then go through the language and provide all the marketing information.

Put my name, email and phone in the support page.  In Categories I checked Business Application.  Then finally I requested approval to push to production.

Now I expect to be contacted by Microsoft and helped with getting my Extension online in Dynamics 365 for Financials.