Quantcast
Channel: Dynamics 365 Business Central/NAV User Group
Viewing all 11285 articles
Browse latest View live

Forum Post: Download Symbols for test app

$
0
0
We are building an extension and doing the test app. We get the following when download symbols. Any ideas on what we missed? Is anyone available for an hour of support? [2019-12-13 13:08:52.36] Using reference symbols cache path: c:\Project\AddIn_iPaymentSystems\Test\./.alpackages [2019-12-13 13:08:52.37] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.38] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.38] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.38] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.38] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.39] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.39] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.39] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:52.39] Sending request to api.businesscentral.dynamics.com/.../packages [2019-12-13 13:08:53.17] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Library%20Assert&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-12-13 13:08:53.19] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System%20Application%20Test%20Library&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-12-13 13:08:53.23] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Test%20Runner&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-12-13 13:09:11.14] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Any&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-12-13 13:09:11.14] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Tests-TestLibraries&versionText=15.0.0.0 failed with code NotFound. Reason: No published package matches the provided arguments. [2019-12-13 13:09:11.73] Could not download reference symbols. Please ensure that: 1. The correct server name and instance are specified in the launch.json file. 2. The correct application version is specified in the app.json file. 3. The dependencies are correctly specified in the app.json file.

Forum Post: RE: Download Symbols for test app

$
0
0
Try to check your app.jason file. It has a lot of dependencies. Try to keep only the system and the base app and try again.

Forum Post: RE: Download Symbols for test app

$
0
0
Literally just went through this today when I refreshed my sandbox. 1. did you create a sandbox and are you able to log into it? 2. check this tutorial: https://thinkaboutit.be/2018/11/how-do-i-develop-an-extension-in-business-central-saas/ In my case I re-created my sandbox and tried to download the symbols. I got errors. I looked and looked for a typo somewhere, checked my old config files, etc. Then it worked all of a sudden when I ran out of ideas and just hit F5 again. I think the environment took a few minutes to set up and I couldn't download the symbols until it was finished...

Forum Post: RE: SMTP CreateMessage (Cloud BC)

$
0
0
which one is the right one? there is only 1 createmessage

Forum Post: RE: Convert Sales Order to Transfer Order

$
0
0
Moved here from Dynamics AX Developer Forum, because it's about NAV.

Blog Post: Keyboard shortcuts in Visual Studio Code for AL development

$
0
0
This week I had a little extra time during my development course @Readynez in Sweden. Therefore, I decided to make an overview of the keyboard shortcuts in Visual Studio code when developing extensions for Dynamics 365 Business Central. And as always, I share it you you. You can download it here in png or pdf format.

Comment on Keyboard shortcuts in Visual Studio Code for AL development

$
0
0
Very useful, not in the least to remind us all of the power of VSCode to be more productive. I think a note should be made that to any users need these shortcuts can be changed at will.

Comment on Keyboard shortcuts in Visual Studio Code for AL development

$
0
0
Personally I would add thse too nbeing very useful:

Blog Post: Creating, handling and debugging the base app in Release Wave 2

$
0
0
Since the base application is no longer available through C/Side in Dynamics 365 Business Central Release Wave 2, we need an alternative way of searching for objects and debugging. That means that we firstly need to get access to the base application. Luckily, we all have access to it, we just don't know it. Creating the base Application So, here is the recipe to create one: First open Visual Studio code and create a new project for Release Wave 2: Point to a local Release Wave 2 service tier or to the cloud version and download symbols. Now open the new folder in the project called: .alpackages and drag the file Microsoft_Base_Application_15.1.xxxxx.xxxxx.app to the Desktop. Now rename the base application file to .zip. Even though it is now a zip file, win-zip cannot open the file, but WinRar can. You can download WinRar here . (Remember do buy one if you use it often ) Install WinRar and open the base application filer with WinRar. This is the source code for the base application, so open the folder and copy the content to your project: It takes a while since the base application consists of 5862 files: And now you own your own copy of the base application: Browsing the base Application So now that we have a copy of the base application, it is apparent that Microsoft have changed the object naming (again): The object types are moved to the end of the file name The object number has gone Everything is in alphabetic order In the beginning I thought that it was a mess, but as several of my colleagues also stated, it groups all application modules or areas together. Good or bad?, get used to it, it's here to stay It took me a while to learn to maneuver the base application, but when I decided to find all the shortcuts in VS code as described in my previous post, I found the Ctrl+P function (Find File). So to find the Sales Header table , simply press Ctrl+P and search for salesheader.table.al : Click the table and you have it: Remember that you can search in ALL objects Using Ctrl+Shift+H or clicking the magnifying glass: We never had that before . Debugging the base Application Now we have the base application, maybe it is also possible to debug the base application. Yes that is possible and it is very nicely described in Stefanos blog in all details. But I am lazy so I just do this: I make sure that my launch.json is updated with the connection to the service tier I want to debug Set a break-point in the table I want to debug in this case the Sell-to Customer No. field in the Sales Header table Press Ctrl+Shift+P and select AL Debug without publishing When the web-client opens, I simply open a sales order and enter a Customer No. in the Sell-to Customer No. field: And now we are debugging Remember that we also have other tools: Code Coverage showing all code that is executed while recording Event Recorder showing all events is possible while recording

Blog Post: What do I do wrong when C/SIDE debugger does not show my extension code although showMyCode is set to true?

$
0
0
While developing your own extension on NAV 2018 or "BC under version 15" you have the availability over 2 debuggers: the VSCode debugger and the C/SIDE (or should we call it Windows) debugger. Both serve a somewhat different scenario: VSCode debugger You want to run step-by-step through the code of your extension - being AL code - and from there might step into the code that resides in the NAV/BC installation you are programming against. Most probably the C/AL code of the standard application. C/SIDE debugger You want to debug a process starting from either the web or window client, most likely because of an error occurring. Chances are big you will hit C/AL code, but also AL code of your extension when you have showMyCode set to true. No way to get this effectively done with the VSCode debugger. But last week it did not work the way I expected it to do. One of my students of the Opgona Junior Training was expanding his extension on BC 14 with an XML import, using an XMLport. As the BC 14 web client unfortunately does not support the XMLport request page (but does on BC 15), I suggested to use the windows client to easily operate his solution. Running into an issue he wanted to debug and thus could only use the C/SIDE debugger. But whatever he did, the C/SIDE debugger did not show his code. And yes, showMyCode was set to true in the app.json of his extension. So I posted a tweet asking what was done wrong: A lot of people stepped in and eventually my former, and ever very helpful, MS colleague Duilio Tacconi came to the rescue: By adding a hidden setting to your customsettings.config C/SIDE debugger should show AL code: And yes, it makes the AL code visible in the C/SIDE debugger. But the question is why we do need this? Or more precise: since when do we need this? I was quite sure it was working without fine. On NAV 2018, on BC 13 and also on BC 14. Just checked on a docker installation of BC 14.1 and indeed working as I expected, and wanted. Allain Krikilion apparently had noticed the chance prevously this year: Did not make a full check but 14.7 clearly has this issue .

Forum Post: RE: Order Range / setrange by multiple columns

$
0
0
Column 1 and column 2 are only two fields in the table (no primary key). I used SetRange, SetFilter, SetCurrentkey and FindLast to get the information i wanted. Example: procedure SortedData ( ) var Tab1: Record "Tab1"; begin Tab1 . SetRange ( "Column1", "Column1" ) ; Tab1 . SetFilter ( "Column1", "Column1" ) ; Tab1 . SetCurrentKey ( "Column2" ) ; if Tab1 . FindLast () then begin ..... end ; end ;

Blog Post: Breaking up BaseApp | Business Central

$
0
0
Social media is fantastic and it can be used in many different ways. Where most people are mostly consumers others use it to ask questions. Some share knowledge and experience and gain loyal followers. This is pure awesomeness and mostly rewarded with the Microsoft MVP award for those who don’t give up. Drive Change Very few succeed in using social media to drive change. Those who do are known by many such as Elon Musk and Greta Thunberg. With Business Central we have a very little ecosystem but we also need to drive change from time to time and most often this change is very slow and requires patience. We’ve been through a lot of changes and each and every one challenged our legacy. Just to name a few examples: Move from Dos to Windows in 1995. Move to SQL Server, move from Forms to Pages, implementing RDLC, moving from C/AL to AL, going from Windows Client to Web and last but not least the extensions only model. During all these changes the code of our beloved application has barely changed a bit. If you open the customer table in the old DOS version of Navision you’ll see code that still exists today. This is just a tiny example. The most important learning that I take from this is that Business Central was born in the cloud when the cloud has yet to be invented. We’ve always been a lo-code environment before this was hip and modern. Time to change In essence there is nothing big that I would like to change to Business Central. Nothing that would drastically destroy the main architecture. However I do think it’s a bit to big and it could be broken up into a few decoupled modules. Fortunately I am not alone in this quest. This is where social media get’s in. A few weeks ago I’ve done some calls for action telling that I wanted to experiment making the BaseApp smaller starting with some of the edge cases. The reason why I think it’s good to make BaseApp smaller is to make it easier to understand for new developpers. Our Test We’re trying a few things. One is to make two or three modules into a seperate extension on top of BaseApp. Examples are Service Management, Fixed Assets and Cost Accounting. Service Management brings challenges to inventory and removing it exactly points out the places where extendability is important. If we implement events and interfaces/enums at the point where Service Management needs them others can use these points to hook in their apps. Fixed Assets looks to be a bit more manageable but we’ll hit the interface with Sales and Purchasing. Again, implementing events and interfaces/emums for Fixed Assets will help others plug in modules into these area’s. Cost Accounting has not been started. This is orriginally a DACH module and more or less stand alone. Curious to see what can of worms we open here. Lastly one of our team members has a great idea to make Item Tracking more extendable using Argument Tables. Together with Microsoft First in Vienna and later at NAVTechDays I talked for a very long time with the engineers at Microsoft and they are open for ideas. I think we both realise that most of the knowledge of BaseApp is in the partner ecosystem and what we need is a manageable bridge between both parties. This is the challenge I’ve accepted. On top of my “normal” business and my family. This means the team, now six members, is self managed. We use Microsoft Teams and email to communicate and GitHub to share code. The process is slow but steady and in January we’ve presenting the first results to Microsoft. This may just as well be a dead end road but I have high hopes this is not true. Remember that the modules that I descibe here have been added later to Navision. Had there been extensions back then it would have probably already been loosely coupled. Both Ends Microsoft is working very hard from their end to make BaseApp smaller by working more on the generic parts. This is more framework-like work and fits better with the engineering capabilities that Microsoft is good at. Together we might be able to cut the size in half or maybe two/thirds which would be a great start. Join Us If you think you can handle the responsibility of working in a team that is not micro managed where people work when they have time you can join us. I think we should not make the experiment bigger than it is. Four branches is enough. Nobody in the team is an mvp. Just mere mortals trying to see if this might work.

Blog Post: Control Add-ins Supercharged: Babel

$
0
0
After a short absence, I am back. The next lesson in the Control Add-ins Supercharged series I am introducing Babel . “Babel is a JavaScript compiler” , says babeljs.io. So, what’s the big deal, you may ask? The big deal is that Babel will take your super-fancy high-end future-generation JavaScript code that barely any browser supports, and turn it into something that even Internet Explorer can run. In theory, at least. In practice, it’s a bit more complicated. To learn about theory and practice of Babel in control add-in development workflows, check this branch: https://github.com/vjekob/supercharged_01/tree/07-gulp-babel And that’s it. The Readme.md file contains all the theory and practice you need. So, navigate to my github and check it out. Read this post at its original location at http://vjeko.com/control-add-ins-supercharged-babel/ , or visit the original blog at http://vjeko.com . 5e33c5f6cb90c441bd1f23d5b9eeca34 The post Control Add-ins Supercharged: Babel appeared first on Vjeko.com .

Forum Post: RE: Order Range / setrange by multiple columns

$
0
0
Another way that i learned about just now is to use SECURRENTKEY for two fields: SetCurrentKey("Column1", "Column2") What do you think Erik P. Ernst ?

Blog Post: LinkedObjects on Dynamics 365 Business Central: be careful now!

$
0
0
One of the common (and basic) way to create integrations between systems in Microsoft Dynamics NAV in the past was to directly work at the SQL Server level and create tables linked to SQL objects by using the table’s LinkedObject property. With Microsoft Dynamics NAV, you can create a SQL Server view , then create a table with the same name as the view and set the LinkedObject property to true . Magically, this table is “linked” to the view and you can see the view’s data from Microsoft Dynamics NAV. If this code works, why not using it also with Dynamics 365 Business Central on-premise? A lot of partner has moved their solutions to extensions and for these on-premise integrations scenarios they have used LinkedObjects as in the past. But… what happens now? To explain the scenario and the issue that lots of partners have found, I’ve done exactly this on my environment (Dynamics 365 Business Central on-premise version 15.x). I’ve created a view via T-SQL with the following script: CREATE VIEW dbo.[Customer Payment View] AS SELECT C.No_ as CustomerNo, C.Name, max(CL.[Posting Date]) as MaxPaymentDate FROM [Cronusit].dbo.[CRONUS Italia S_p_A_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] C left JOIN [Cronusit].dbo.[CRONUS Italia S_p_A_$Cust_ Ledger Entry$437dbf0e-84ff-417a-965d-ed2bb9650972] CL on C.No_ = CL.[Customer No_] where CL.[Document Type] = 1 group BY C.No_, C.Name GO The view returns the following data: Then I’ve created a new extension with Visual Studio Code and AL. In this extension I’ve defined a table object as following: The table definition has LinkedObject = true (so it’s linked to a SQL object). The extension defines also a page object for displaying the data: When you deploy this extension on your Dynamics 365 Business Central on-premise instance and you try to access the Customer Payment View page, this is what happens: Data are not displayed and the page is “blocked” on trying to fetch the data until a system error is thrown. And many partners are lost… Why this problem? Because LinkedObjects works like every objects inside an extension: when you declare the table object in your extension, it’s created by appending the extension’s id to the object name, and so your SQL view must be created accordingly. In my extension’s app.json file, the id is as follows: The SQL view should be created accordingly (so, with the extension’s id in the name). If I execute now the following SQL script: CREATE VIEW [Customer Payment View$251ca5f1-14b0-4f53-ae71-9dbab145e5f9] AS SELECT C.No_ as CustomerNo, C.Name, max(CL.[Posting Date]) as MaxPaymentDate FROM [Cronusit].dbo.[CRONUS Italia S_p_A_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] C left JOIN [Cronusit].dbo.[CRONUS Italia S_p_A_$Cust_ Ledger Entry$437dbf0e-84ff-417a-965d-ed2bb9650972] CL on C.No_ = CL.[Customer No_] where CL.[Document Type] = 1 group BY C.No_, C.Name GO this is the created SQL view: What happens if you deploy the extension now? Magically, the data of the LinkedObject table are shown: This is a noisy problem, probably something that should be changed or fixed because on lots of situations you have a view created by someone else and its name cannot be changed accordingly to your extension’s id (that normally is not known at the moment where someone creates the SQL view). Be careful on this… I add to this post also a note: on many scenarios, instead of using LinkedObjects I think you should use ExternalSQL tables. Compared to the LinkedObject property, ExternalSQL table type permits you to have a table connection that is controlled at runtime. This provides a more dynamic table relationship than creating table definitions from SQL Server objects using linked objects: In the OnOpenPage trigger of the page, you can handle the connection to the external table as follows: UNREGISTERTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, DATABASENAME); REGISTERTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, DATABASENAME, CONNECTIONSTRING); SETDEFAULTTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, DATABASENAME); Much more flexible (and your table cannot have exactly the same field names as the linked table).

Forum Post: RE: SMTP CreateMessage (Cloud BC)

$
0
0
There are two CreateMessage procedures in the SMTP Mail codenit, each one with different parameters. It's called overloading, you can read about that here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods/devenv-overload-method . The system knows which one you want to use because of the parameters that you are using. You need to change the call to use the parameters of the new version of that function. Here is the obsolete signature: procedure CreateMessage ( FromName: Text ; FromAddress: Text ; Recipient: Text ; Subject: Text ; Body: Text ; HtmlFormatted: Boolean) And here is the new one: procedure CreateMessage ( FromName: Text ; FromAddress: Text ; Recipients: List of [ Text ]; Subject: Text ; Body: Text)

Forum Post: Setrange for Option field

$
0
0
Hi All, I have one option field on 'Job Card' i.e. Feedback Type. I have to calculate the no. of jobs for which Feedback Type is 'Excellent' and divide the count by total no. of Jobs. Total no. of jobs has been calculated and SetRange has been put on Feedback Type. But, I am not getting how to get the no of jobs for which Feedback Type is 'Excellent'. Please suggest the solution. Below is the block of code : Rec_Job . Reset () ; Rec_Job . SetRange ( Feedbacktype, Feedbacktype::Excellent ) ; Total_No_Of_Jobs := Job .Count ; if Rec_Job . FindSet () then repeat Excellent := Feedbacktype / Total_No_Of_Jobs; Excellent is the variable to store the calculated value. until Rec_Job . Next = 0 ;

Forum Post: RE: Setrange for Option field

$
0
0
[quote userid="205508" url="~/nav/f/developers/97396/setrange-for-option-field"][/quote] Rec_Job . SetRange ( Feedbacktype, Feedbacktype::Excellent ) ; This Should be Rec_Job .SetRange(Feedbacktype, Rec_Job.Feedbacktype::Excellent);

Forum Post: RE: Convert Sales Order to Transfer Order

$
0
0
I don't think there's any out of the Box functionality for this. May be you need to go ahead with the customisation. But via Transfer Order you can only do the transaction between Locations , you can not ship to the Customer so eventually at the end you need to complete the transaction for Sales order.

Forum Post: RE: Generate Report pages dynamically

$
0
0
I was able to achieve this using the Word Layout. I used the Integer Table as my first dataitem. Then on the word document I created a 4 x 6 page, inserted a table in the word doc with only 1 cell. This table is the full size of the page. I then inserted a repeater in the table which is linked to the Integer dataitem. The report has a 1 parameter to get the number pages required. I then set a filter to the Number table based on the number of pages required. It wasn't easy to do and get it working but once you figure it out, it makes sense. Thanks Yann
Viewing all 11285 articles
Browse latest View live


Latest Images