Checkout how Download Source Code feature on Extensions in Business Central Version 15 Production helps customers.
Problem: A friend of mine was looking to migrate their Business Central development and support from one partner to another. While, asking me for advice, I was evaluating what was the best solution knowing that their Business Central had customization installed and I found this which made it easy for them as their going to continue customizing Business Central from another partner. Solution: In Business Central version 14 Sandbox, you are allowed to Download Source Code. But in Business Central version 14 Production, this was not the case. No Apps. could have been downloaded even though you got it developed from a Partner/ Developer and installed from them.In Business Central version 15 Sandbox, you are allowed to Download Source Code just like you would in Business Central Version 14 Sandbox. Download Source Code for Installed Extensions in Business Central V15 Sandbox And this is also the same condition for Business Central version 15 Production tenant as well. Download Source Code for Installed Extensions in Business Central V15 Production Without this, the possible solution to get your app source code back from Production, you would be required to make a copy of Production into Sandbox and download it from there in Business Central Version 14. Note: This doesn’t apply to apps installed through MarketPlace. Trust me I have tried 😜!!! Conclusion: When App was installed in Business Central Version 14 Production ensured Partners / Developers that app couldn’t be reused on other tenants. This put most of the pressure on the Customers to explicitly to ask the Vendor to provide the App File. Whereas when an App is installed on Business Central Version 15 Production, it can be downloaded and installed in another Business Central Tenants. This means that if the Customers want to change their partners, they can seamlessly do this without having the awkward conversation of asking the code from their previous partner.
Share Story :
Generic way of Attaching Documents on any Record of the Page in Microsoft Dynamics Business Central – Template Code
Problem Statement: In Microsoft Business Central, there is a way to attach attachments only on Documents or Master Table records. But, what if this requirement is for other tables such as Opportunities, custom tables, etc. Introduction: I have seen many developers afraid to touch the attachment-related customization as it seems complicated. Well, I have found a solution and here it goes. In this blog, I’m attempting to create a generic template for code that needs to have an attachment feature on any table that you like using AL Code. This means that you simply cannot copy-paste the same code for all the tables but a simple change in variable sub-type will ease your work significantly Pre-requisites: Microsoft Dynamics Business Central VS Code Al Language Extension Source Code: https://github.com/olisterr/Generic-Attachment-Template Demonstration: 1. How it works: Document Attachment is a table which stores a few things that help in tracking information related to the attachment Document Attachment Table Fields The main unique thing that works for all the different tables is the TableID, Line No and No. fields. Along with this, the document is attached through a stream inside a Media DataType. There are 2 important functions 1. SaveAttachment2 : This function takes a few parameters RecRef for origin Table ID, FileName to store the file name, Blob which will be imported a Stream in Document Reference ID Media type field, Recs.No which will store the unique record for which the attachment is attached. This function when the line has no attachment attached to it. This is done by checking if the field Document Reference ID has no value. SaveAttachment2 2. Export2: This function exports the attached BLOB to a file. This is done if the Document Reference ID field has any value. Export2 This is both functions are complimentary of each other and are trigger on FileName field DrillDown DrillDown to Attach OR Export 2. Things that you need to change: Either you are using the Generic Attachment Template code first time or mulitple times in the same project, you need to find //Change the Table Name Here—-OLISTER and //Change the Page Name Here—-OLISTER comment and replace your table name. Also, you will need to manage with the PageName and IDs. Read through README.TXT in the project. README.TXT 3. Custom Attachments for multiple tables: In the above case, I have created the code for the Opportunity Card page. I will repeat the same for Item Card Page. Prior to Items Card Page Make a copy of all the 3 Pages and change their names and Ids. After adding a new set of pages for different tables Change the Table Nos on the comment line //Change the Table Name Here—-OLISTER and //Change the Page Name Here—-OLISTER After changing Table Names After changing Page Names After changing Part Page Names 4. Output: Finally, I got this. Opportunities Attachment Items Attachment Conclusion: Thus, we are successful in creating a generic code template for attachments. Hope this helps!
Share Story :
Generate Hash Value and Integrate Form Data Third-Party System using API Object.
Problem Statement: Every document that goes out or comes into Business Central requires some kinda validation to check its originality which confirms the confidentiality of the document. Introduction: This blog is a two-step process in which I will be explaining how things work and how to write a code for this. This blog also is an update on Hannes Holst Blog(https://www.hannesholst.com/blog/technology/hash-hash-baby-secure-hash-algorithm-in-nav-365bc-and-a-little-more/) and you don’t need to access any .NET variable. Pre-requisites: Microsoft Dynamics Business Central VS Code AL Language Understanding of how data is transferred using API Books & References: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpcontent/httpcontent-data-type https://www.hannesholst.com/blog/technology/hash-hash-baby-secure-hash-algorithm-in-nav-365bc-and-a-little-more/ https://www.yammer.com/dynamicsnavdev/threads/465800571707392 Demonstration: 1. Creating a Hash Value: Whenever a file is Uploaded to Business Central Document Attachment Table, Business Central should auto-calculate its Hash value. The Hash Algorithm will be selected on a setup. Creating a Local Hash Value field in the Document Attachment Table. Document Attachment Table Extension Hash generated by Business Central Create a set of the field on Setup Table where you will be selecting the Hash Algorithm. API Setup for Trokt App Calculating Hash Value using the Cryptography Management Codeunit. Thanks to Natalie(https://www.yammer.com/dynamicsnavdev/threads/465800571707392), who pointed me in the right direction. Creating HASH Value from File After the computation of Hash Value, the Third – Party Tool API should be triggered with a parameter as the Hash Value. 2. Integrating API with Third-Party Tool: When API has triggered with the Hash Value as a form data, the Third-Party Tools recognizes the Hash Value and then auto-computes other parameters and returns their unique value. API Call with Form – Data payload and storing response This unique value is going to be stored in the Business Central Document Attachment Table. Attaching File and getting TROKT HASH in Document Attachment Table Checking the API Data through POSTMAN passing the HASH Value as a Filtering Parameter Checking if HASH Value was passed to TROKT API Conclusion: Overall, this was the journey as a trial and error process for one of my clients Proof of Concept. I’m really happy with how perfectly it turned out to be.
Share Story :
How to get Preview Version of Business Central
Introduction: With Business Central now progressing it’s way in the market, Microsoft will be releasing seamless upgrades every 6 months i.e April(Wave 1) and October (Wave 2). Thus, this means that with each wave there are going to be public preview coming up for the customers to get few insights as to what all is expected. Pre-requisites: Microsoft Dynamics 365 Business Central. Books & References: https://docs.microsoft.com/en-in/dynamics365/get-started/release-schedule https://freddysblog.com/2019/07/31/preview-of-dynamics-365-business-central-2019-release-wave-2/ Demonstration: There are two ways to get Microsoft Dynamics 365 Business Central Public Preview 1. Create a new Sandbox: In the Admin Center for Business Central, you can create a new Sandbox with preview Signing Up Business Central Sandbox for Version 16 Public Preview Microsoft Dynamics 365 Business Central Wave 1 2020(V16) on Sandbox 2. Create a Docker Container: Referring to https://freddysblog.com/2019/07/31/preview-of-dynamics-365-business-central-2019-release-wave-2/I had noticed that when you are creating a docker container using BC INSIDER, you will get a the latest version of Business Central Docker Container. Microsoft Dynamics Business Central Wave 1 2020(V16) Container Setup Business Central Login Business Central Wave 1 2020 (Version 16) Container Sandbox Note: For you to get access to BCINSIDER, you will need access to Microsoft Collaborate. There inside the packages, you will find the text file which will contain the access credentials to BCINSIDER container image. Conclusion: I hope this blog helped in anyway setting up public preview in Microsoft Dynamics Business Central. In my upcoming blogs, I will also showcase how we can setup public preview in Microsoft Dynamics 365 Business Application.
Share Story :
Suggest Vendor Payments feature in Payment Journal – NAV/ Business Central
Introduction: In this blog, I will be attempting to highlight on Suggest Vendor Payment functionality in Payment Journals. Pre-requisites: Microsoft Dynamics Business Central Microsoft Dynamics NAV Demonstration: Last Payment Date: This date is the latest date which can be appeared on Vendor Ledger Entries for making the Payment. Entries that have Due Date or Discount Date before the Last Payment Date will be included in Suggest functionality. Last Payment Date Find Payment Discounts: Find all the Payments which will have discounts. If this field is TRUE then Suggest Vendor Payment functionality will include Payments with Discounts as well as Payments without Discounts. Find Payment Discounts Use Vendor Priority: While making payments, if you want to prepare the entries priority wise, then you will need to set the priority of Vendor under the Payments section. Use Vendor Priority Priority field in Payment Section in Vendor Card By default, the priority is set to 0. If Vendor priority is not set which means that the Vendor Payments are to be processed in Alphabetically FCFS fashion. Available Amount: If the Available Amount is filled in which means that the maximum amount for the payments will be considered. Available Amount Skip Exported Payments: This boolean is used to skip those payments for which the Payment EFT file has been exported. This is generally used where the Payments are not supposed to be posted but the new payments are to be included in the list. Skip Exported Payments Check Other Journal Batches: This boolean field is used to skip all those payments which have already been included in the different General Journal Batches. This will avoid including duplicate payments. Check Other Journal Batches Summarize Per Vendor: This will make a single Payment per Vendor which will be applied to multiple documents. Also, this boolean will create separate payment entries for payments with different currencies. This feature cannot be used in conjunction with ‘Calculate Posting Date from Applied Entries‘ Summarize per Vendor By Dimension: This will create the entries for which the applied document will have the correct dimension. By Dimension Posting Date: Sets the Posting Date for the General Journal Lines. Posting Date is generally set to today’s date or date after the late payment date. Posting Date Calculate Posting Date from Applied Entries: Sets the Posting Date from Applied Entries based upon the Due Date of the Applied Document. Calculate Posting Date from Application Starting Document No.: Starting No. Series for the Payment Journal. This value will be set to Next No. after current Payment Journal Lines have been created in Payment Journal. This field is generally auto-filled. Starting Document No. New Doc No. per Line: This is used to create a separate Document No. for a separate entry line. When this is set to false, automatically a single Document No. is used for multiple entries of a single Vendor. New Doc. No. per Line Balance Account Type: Balance account type can be a G/L Account or Bank. Bal. Account Type Bank Account No. Used to generate only payments from a specific Bank Account. Vendor Filters: Vendor Filters are basically used to get only those payments related to a particular Vendor. Vendor Filters Conclusion: Thus, Suggest Vendor Payments can be a pretty good tool to deal with Payments where you don’t have to manually go and reconcile for the Vendor Purchase Invoices. There are a lot of variants to get the pending Payments with a lot of filters in Suggested Vendor Payments.
Share Story :
Change in URLs for Business Central Tenants
Change in base URLs for Business Central SaaS Tenants. I have noticed the Business Central links for Tenants have changed. For Production the URL in use will be https://businesscentral.dynamics.com/<Tenant ID>/Productionwhereas earlier the URL https://businesscentral.dynamics.com/<Tenant ID>/ For Sandbox the URL in use will be https://businesscentral.dynamics.com/<Tenant ID>/Sandbox whereas earlier the URL was the same as current URLThis changes are mainly to distinguish between the multiple Production Tenants coming up in October with the 2019 Wave 2 Release. For now, both the Old and New Production Tenant URLs are operational.If you login through https://home.dynamics.com/ or through Admin Center it will redirect you through the New URL. I will keep you posted as soon as notice an updates. #msdynbc #msftadvocate #businesscentral #changeinurls #msdyn365bc
Share Story :
Record Deletion Tool in Business Central
Introduction: After a successful Go-Live in Business Central, we somehow need to delete a record from Backend. There is no way of doing this until you write a code to delete the specific record. I also had a word with Microsoft Support Team who recommend taking this approach. Thus I have created a Generic Record Deletion Tool where you have to put your Table Number and Primary Keys to delete the specific record. Record Deletion Tool : https://github.com/olisterr/Data-Deletion-Tool/blob/master/Report%2050199%20DataDeletionReport.al Pre-requisites: Microsoft Dynamics Business Central Books & References: https://forum.mibuso.com/discussion/6922/how-to-setrange-and-find-a-record-with-recordref-datatype Demonstration: NOTE: This tool is available for free without any warranties. Use it at you own risk. 1. Global Search for the Tool: Searching for the Record Deletion Tool 2. Filter records by Table No. and Primary Keys: Filling in the Table No. and Primary Keys 3. During Record Deletion: Shows the Record Deletion Confirmation 4. After Record Deletion: After the Record is Deleted. Conclusion: This Record Deletion Tool I have added as an extension to Olof Simren’s Data Deletion Toolkit (https://github.com/olisterr/Data-Deletion-Tool). This tool can be used after Post Go-Live to delete a record in Business Central Production Environment. Also, it can help you browse through the Table Data inorder to find a record. Hope this is useful to you. Let me know in comments.
Share Story :
What do you do when your NAV 2017 Job is not triggering through Job Queue Entries
Microsoft Dynamics Nav Integration is one of the most popular ERP solutions that most of the medium and large enterprises use today. It is an ERP solution that is not only easy to learn but is easy to learn and implement. Your staff is going to become a lot more efficient when they use this ERP solution. Microsoft is one of the best companies in the world for all the right reasons. This software contains some of the best and unique features that will not only raise the productivity of the staff but will also improve your performance. But, if enterprises want to enjoy the benefits that come from this ERP solution, they need to plan on upgrading Dynamics NAV to a cloud-based environment. Introduction: Working with failed Scheduled Jobs can be a tiresome process. This is exactly the case where one of my clients has an Invoicing & Payment Jobs which run once a day and Job Queue Entries fail to trigger these Jobs. No Errors in the Logs, No Execution Entry, Simply No Way of Figuring it out as to why Job didn’t trigger. Contacting Microsoft Support, they are asking to simply Upgrade the Application to the latest version. Which is not a preferred option as the database size is around 200GB. Let’s see how to resolve this in a smarter way. Pre-requisites: Microsoft Windows Task Scheduler Microsoft Windows Powershell Microsoft Dynamics NAV(Administration Module for PowerShell & Development Environment) Books & References: https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.management/?view=businesscentral-ps Demonstration: 1. Building Objects to Run through a Codeunit: As you know that Job Queue Entries support Reports and Codeunits and NAV Administration Module only supports Codeunit. So, in order to make it work, create a Codeunit to execute all the Reports and code units. 2. Creation of PowerShell Script: This PowerShell Script executes with the help of NAV Administration to Run the Codeunit. Prior to running the script, you need to set the Execution Policy. Syntax: Invoke-NAVCodeunit <Codeunit No.> – ServerIntance <ServerInstanceName> -CompanyName <Company Name> -Force 3. Setting Up Task Scheduler Triggers: By Setting up the Triggers, you can decide recurrence to execute the Codeunit. It can be Hours, Daily, Weekly, Monthly, One-Time or Infinite. You can also set the time for precise execution. 4. Setting Up Task Scheduler Commands: Whenever we execute the PowerShell Script through CMD, we run the commands as follows. Command: PowerShell.exe <PS Script File Path> Here, we pass the PowerShell.exe into the script and PS Script File Path as a Parameter. Conclusion: Thus, using NAV Administration Module, Power-Shell and Task Scheduler I was about to replicate Job Queue Entries functionality. Although this works perfectly for NAV and Business Central – On-Premise, it works for Business Central on SaaS. In my upcoming blog, I’ll also show we can achieve this. Hope you guys find this blog useful 😇
Share Story :
General Journal Views in Microsoft Dynamics Business Central
Introduction: Recently In Business Central, I have observed the format for General Journals where the unnecessary fields are hidden in order to avoid confusion. Pre-requisites: Microsoft Dynamics Business Central Demonstration: There are 2 Views of General Journal in Business Central. 1. Limited field view: Limited Column View 2. All field view: Full Column View 3. Switching to Limited Field View: Switching to Limited Field View 4. Switching to All Field View: Conclusion: Thus, this limited view from all field view is helpful to avoid confusion during data entering but it has drawback. If you are entering Account No. as G/L Account and want to switch the Customer as Account Type, there is no way of doing it from Limited field view.This is because in General Journal functionality, Business Central automatically selects the Account Type from previous entry causing this drawback.
Share Story :
How to Run Reports When Report Processing Takes Long to Cause Session Time-Out
Microsoft Dynamics Nav Integration is one of the most popular ERP systems that a lot of companies are using. So many of them have benefited by using this particular software. Especially small and medium-sized companies love this software as it helps them to plan the resources carefully. Installing this software is not a difficult task. Retailers can easily integrate it with other solutions that they are using. Microsoft Dynamics Nav Inventory Management will help companies keep track of the materials they have in their warehouse. It helps them to plan their purchase, sales and the discounts that they offer to their customers carefully. Here are quick bits of how you can pick the reports easily even when the system is taking too long to process your request. Introduction: I’ve observed that when NAV is used for a very long time, the report which needs heavy processing takes long enough to cause Session Time-out. So, fetching reports becomes tedious by manually querying the table. Pre-requisites: Microsoft Dynamics NAV, Microsoft Dynamics Business Central Solution: The solution is simple, export the Report as an Excel or PDF depending on the data and send Email to the User as an attachment after the processing is complete. Code: 1. Create the Report in Excel Using Excel Buffer. 2. Export the Excel Buffer contents to an XLSX file. 3. Email the Exported Files to appropriate User. In this case, I have hardcoded the user email to my email. Output: Exporting Progress of Excel Worksheet Exported Intermediate file to be emailed Email received after the report is completely exported. Conclusion: Thus adding a piece of code to send email to the User, can save a lot of hassle. In Business Central, however, it is not possible to modify an existing report. So, you need to export the existing report and merge it in AL using Text-To-Al.