Category Archives: D365 Business Central
Correct Posted Purchase Invoices – Dynamics 365 Business central
Introduction : This functionality helpful to correct posted Purchase invoice if user make mistake or want to do any changes. You cannot correct posed purchase invoice which are partially or fully paid. Steps: In search bar enter Posted Purchase Invoice and chose the related link. Select and open Posted Purchase Invoice which you want to correct. Click on correct button on Posted Purchase Invoice form. Once you click on correct then you will get below pop up. Choose yes to continue. New Purchase Invoice with same information will be created. Make the changes whichever are required and click on post button to post purchase invoice. In Posted Purchase Invoices form, you can check new posted purchase invoice. Choose Show Corrective Credit Memoto view the posted purchase credit memo that voids the initial posted purchase invoice. Conclusion: This feature reduce the effort of users to create manual credit memo and again create new purchase invoice.
Share Story :
Custom Transformation Rule for ACH using AL Extension in Business Central
Introduction: Dealing with Electronic Bank Payment Setup can be tedious and time consuming. In this blog, I’ve a unusual requirement where the payment date should be the next day of the check issue date. Pre-requisite: 1. Microsoft Dynamics Business Central 2. VS Code and AL Language Extension Demonstration: 1. In standard Data Exchange Definition, I didn’t find any rule to increment the date by 1 day. So using the Integration Event and Event Subscriber, I’ve written AL Code to use the custom transformation rule and perform the +1D operation. 2. I’ve created a custom Transformation Rule in the Feild Mapping on Data Exchange Definition in this case ‘ADD1D’ and set in the field mapping. 3. In the code I’m looking for the transformation rule with the name ‘ADD1D’ and then use the code to actually add 1 day to the date. Code: 4. Output: Conclusion: This type of customization not only can be done with Data Exchange Definitions. This was an example of how the Integration-Event Subscriber can be used to modify existing functionality in Business Central
Share Story :
Copying above field data using F8 key in D365 Business Central
One of the most useful shortcuts of copying above field data into new field using F8 key which was present in NAV Windows client is now available in D365 Business Central. Users can just click F8 and the data on the field above the selected field will be copied into that field. This will save lot of time specially in case of data entry.
Share Story :
To create a Customer Record from Microsoft PowerApps to Microsoft Dynamics 365 Business Central and vice-versa.
Introduction: This blog explains how to create an application in Canvas PowerApps that can integrate the data from the App to Business Central and vice-versa. I have created an app that on creation of a Customer record will create the record in Business Central and the same in opposite direction. Pre-requisites: Microsoft PowerApps Microsoft Dynamics 365 Business Central Steps: 1. Go to PowerApps, select create an app from blank and select the Business Central connection of your tenant. 2. Select the Company and the Customer table. 3. The basic design of the screen is created where you can view the list of customers, you can also edit the view as per your requirements. 4. The ‘+’ sign on the screen is used to add a new customer record. Logic behind the button is: NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None) 5. Add the Customer Details and click on the submit button to submit the record or cancel button to go back to the main screen. Logic for submit: SubmitForm(EditForm1) Logic for cancel: ResetForm(EditForm1);Back() 6. The Customer record is created both in the PowerApps as well as Business Central. 7. Now create a new Customer Record in Business Central. 8. Now go to Powerapps, on the main screen click on the Refresh button the customer record will be created in the list. Logic for Refresh: Refresh(customers)
Share Story :
Positive Pay Export having multi-length Void Check Indicator in Business Central for Santader Bank.
Introduction: There is a client requirement where the Positive Pay Export has a void-check indicator which needs to be 3 Text character. Although there is 1 Text character field for Void Check Indicator in standard positive pay, I couldn’t get it to convert to the desired format by using Transformation Rules or Text Padding. Thus I have made few customizations and is demonstrated below. Pre-requisites: Microsoft Dynamics 365 Business Central. Working understanding of Positive Pay Export. Refer(https://www.cloudfronts.com/setup-positive-pay-export/) Demonstration: As per requirements for Santander Bank, Void Check is indicated by *26 Print Check is indicated by *10 Whereas in standard we get, Void Check is indicated by ‘V’ Print Check is indicated by ‘<blank>’ Using transformation rules such as replace V with *26 and <Blank> with *10, the transformation rules only converts the first character which is V to * and <Blank> to *. 1. There is an existing codeunit(1704) which is used as Pre-Mapping Codeunit in field Mapping in Positive Pay Data Exchange Definition. 2. Create a Table Extension for Table 1241( Positive Pay Detail)and added a text field name ‘VoidStatusIndicator’ of size 50 3. Thus I exported the codeunit to text and converted to AL using Text-To-AL and added the lines as follows in PrePosPayDetail function. 4. Map the newly added field VoidStatusIndicator in the field mapping and chnage the Pre-Mapping codeunit value to the ID of newly created codeunit. Output: *2623137269100000000008935713384000000500710241800000010205 *1023137269100000000008935713384000000500910241800000010201 Conclusion: This is how we can do Positive Pay customization can be done. This method is not limited to Positive Pay but with all the Data Exchange methods. In my next blog, I’ll be writing about the customization for ACH.
Share Story :
Workaround to ‘Edit in Excel’ functionality with Import/Export using Excel Buffer in Business Central
Problem Definition: When working with ‘Edit In Excel’ functionality in Business Central, there was an error( https://github.com/Microsoft/AL/issues/4060 ) when the page fields were modified using extensions. Introduction: Excel Buffer is one of the feature that is widely used to Import & Export data to and from Excel Sheets. With NAV evolving to Business Central, few of the existing functions are deprecated and cannot be used in AL Extensions. Pre-requisites: Microsoft Dynamics 365 Business Central Demonstration: 1. Excel Buffer Import: In this code, total rows and columns to be imported is found, then each field is stored as ‘CellValue’ in new records in Excel Buffer. Thus, I’ve used GetValueAtIndex(Row,Column) function to get the exact ‘CellValue’. 2. Excel Buffer Export: Conclusion: In this blog, I’ve demonstrated how to use Excel Buffer for Import/Excel of Excel from a table using AL Extensions. NOTE: Code is located( https://github.com/olisterr/ExcelBufferImportExportforBC )
Share Story :
Customer Approval In Business Central Using MS Flows
Introduction: Microsoft Flows is a cloud-based software tool that allows to create and automate workflows across multiple applications. Here, I have created a flow for Customer Approval using MS Flows, where a customer which is created in Business Central can be notified to the particular user using Outlook. Pre-Requisites: Microsoft Dynamics 365 Business Central MS Flows Procedure: 1)First you need to do the SMTP Mail Setup from the Business Central to send the notification. 2) Go to MS Flows, select Create from blank to create a new flow. 3) From the list of connectors, select the Business Central Connector and in Trigger select “When a Customer Approval is Requested”. 4)Select the Business Central Company and add the conditions you want to add for Customer Approval. 5) Add the action or condition to be executed on the trigger. 6) Here, I have added the Outlook action to send a mail to the admin when a customer is created. 7) A Customer is created in Business Central and when we click on Send Approval Request for Customer Approval, a mail is sent to the particular person in outlook mail.
Share Story :
Cancel or correct the posted invoices in D365 BC
In D365 Business Central user can cancel or correct posted invoices. Once the invoices are posted in the system the user can go to posted Sales/Purchase invoice using Global search. Once the Posted Invoice screen opens in the menu ribbon, there is a menu for correct. On clicking of that menu there would be two option as below : Correct: This option will create a credit memo for the invoice and will also create an open invoice so that user can make the required changes and post the invoice again. Cancel: This option will just create a credit memo. The feature of Correct & cancel of posted invoice saves lot of time of the users by automating the process of creating Credit memo.
Share Story :
To make the Business Central WebClient Accessible Externally
Introduction: In this blog , I will demonstrate the use of SSL certificates to help secure connections over a wide area network (WAN), connection from the Business Central Web Server to the Business Central Server. Business Central can support the following configurations: Chain trust, which specifies that each certificate must belong to a hierarchy of certificates that ends in a root authority at the top of the chain. Peer trust, which specifies that both self-issued certificates and certificates in a trusted chain are accepted. The implementation in this section describes the chain trust configuration, which is the more secure option. Pre-requisites: 1. Microsoft Dynamics 365 Business Central 2. SSL Certificates Demonstration: 1. Obtaining Certificates: You implement chain trust by obtaining X.509 service certificates from a trusted provider. These certificates and their root certification authority (CA) certificates must be installed in the certificates store on the computer that is running Microsoft Dynamics 365 Business Central Server. The CA certificate must also be installed in the certificate store on computers that are running the Business Central Web Server so that clients can validate the server. 2. Run the Certificates Snap-in for Microsoft Management Console and Install and Configure the Certificates. (NOTE: The Server Authentication and Client Authentication purposes must be enabled.) 3. Grant access to the Business Central Server service account: After you have installed the root CA and the service certificate on the computer running Business Central Server, you must grant access to the service account that is associated with the server so that the service account can access the service certificate’s private key. In the left pane of MMC, expand the Certificates (Local Computer) node, expand the Personal node, and then select the Certificates subfolder. In the right pane, right-click the certificate, select All Tasks, and then choose Manage Private Keys. In the Permissions dialog box for the certificate, choose Add. In the Select Users, Computers, Service Accounts, or Groups dialog box, enter the name of the dedicated domain user account that is associated with Business Central Server, and then choose the OK button. In the Full Control field, select Allow, and then choose the OK button. In the right pane, select the certificate. In the Certificate dialog box, choose the Details tab, and then select the Thumbprint field. Copy the value of Thumbprint field. For example, copy the hexadecimal characters to text editor, such as Notepad. Delete all spaces from the thumbprint string. If the thumbprint is c0 d0 f2 70 95 b0 3d 43 17 e2 19 84 10 24 32 8c ef 24 87 79 then change it to c0d0f27095b03d4317e219841024328cef248779. 4. Configure the Business Central Server instance: Enter the service certificate thumbprint and the credential type as ‘NavUserPassword’ and restart the server. 5. In the Windows Client Configuration file (ClientUserSetting.config ) and the Web Client Configuration file (NavSettings.json) make the credentials as ‘NavUserPassword’ and the DNSIdentity as the subject name of the certificate. The location of Windows Client Configuration file is Users\<username>\AppData\RoamingLocal\Microsoft\Dynamics 365 Business Central\. The location of Web Client Configuration file is C:\inetpub\wwwroot\BC130\navsettings.json. 6. Now go to IIS and set the bindings for https ( hostname will be the domain name of the server) and in SSL certificate select the CA Root certificate. 7. Now add the CA Root certificate in the external computer and enter the link for WebClient in the browser. (https://<Domain Name>/BC130) Conclusion: Thus, we have accessed the WebClient externally using the SSL.
Share Story :
Error in ‘Amount in Words’ during Check Report Customization in Business Central? Here’s what you can do!
Introduction: In Business Central, the existing reports cannot be modified. Thus, for modifications in the report, the existing report is to converted to text using Text-To-Al and then modifications are to performed. But in case of Check Report(10401) it doesn’t work giving error ‘Index out of bounds!’. Pre-requisite: Microsoft Dynamics Business Central (Online) Solution: When modifying the Check Report in Business Central, the only approach available is converting existing Check Report 10401 to Text and then using Text-To-Al.Which gives the error ‘Index-Out-of-Bounds!’. Thus for a workaround I used the code from https://community.dynamics.com/nav/b/moxie4nav/archive/2014/12/08/numbers-to-words Although this algorithm works perfectly on NAV and Business Central On Premise, it returns the same error on Business Central Online. As assumed, it was because of the recursion used. So, here is the non-recursive algorithm that works perfectly fine up to 8 digits characteristics and 2 digits of mantissa. List of variables: Units[10], Tens[20], Expos[30] are arrays with respective dimensions. Initialization of Variables: Code: Kindly find the text object on GitHub: https://github.com/olisterrcf/CheckReportAmountInWords Conclusion: While the updates are still getting generated on this issue, it is far from being conclusive to reach out to the expected results. As per our cordial discussions with Microsoft, the existing report objects on On-Premise versions such as NAV and Business Central On Premise are not 100% compatible with Business Central Online which are converted using Text-To-Al tool. In the next blog, I’ll write about update for the same.