D365 Business Central Archives - Page 22 of 33 - - Page 22

Category Archives: D365 Business Central

Configure Web Services through Code in Business Central

Introduction: When coding an app that uses Webservices to connect to the integration solutions, it is generally recommended that there is a Setup, which we can configure, where the Webservices are created as well as deleted. Pre-requisites: Business Central VS Code with AL Language Extension Demonstration: Create a Setup Page having a boolean variable say ‘SetupExtension‘ and create a field having value as ‘SetupExtension Variable’.Output: On the OnOpenPage trigger add a code to Check if Web Services are already created and accordingly set the ‘SetupExtension‘ boolean field.Thus, whenever the Setup Page is Opened, the ‘SetupExtension‘ field is set as per the records in Web Services. On the OnQueryClosePage trigger write a code which will create the Web Services when ‘SetupExtension‘ boolean is set as ‘TRUE‘ and delete the Web Services if ‘SetupExtension‘ boolean is set as ‘FALSE‘.Output:i. When ‘SetupExtension‘ is set to ‘TRUE‘New Webservices are created.ii. When ‘SetupExtension‘ is set to ‘FALSE‘Web Services are deleted.  Conclusion: Thus this way we can keep the existing app installed and enable/disable Web Services as needed. As compared to creating WebServices.xml file which directly creates the Web Services on installation of the app, I’ll be demonstrating it in my next blog.

Share Story :

Sales Quote Dynamics 365 Business Central

Sales Quote use to record an offer to a customer to sell certain product on certain delivery and payment term. You can send quote to customer, negotiate with the customer, you can change and resend the sales quote as much as needed. When the customer accepts the quote, you convert the sales quote to a sales order or a sales Invoice in which you process the sale. In the Search box, enter Sales Quotes, and select the related link. Click on new to create new Sales quote. In the Customer No. field, enter the name of the customer Enter the Order date, Due Date, Requested Delivery date, Quote valid to date on Sales quote header. Select item or G/L Account in the type field in quote line. In the field, select the item number or GL number to be ordered. Enter the quantity you want to order in quantity field. Enter the price in in Unit Price Excl. Tax field When the sales quote lines are completed, choose the Send by Email action. If Customer Accept the quote, then on Process tab click on Make order to create Sales order from Sales quote or Make Invoice to create Sales Invoice. You will get below Infolog when Sales order will be created.  

Share Story :

How to fetch a custom table created in Business Central into PowerApps using CDS and Odata.

Introduction: In this blog, I have introduced how to fetch a custom table from Microsoft Dynamics 365 Business Central into Microsoft PowerApps using Common Data Service(CDS) and OData. The table that was created in Business Central was fetched into a custom entity(MatchingLists) in CDS that allows me to create a local database in PowerApps for storing the entity data and OData that helps to fetch and integrate the data. Pre-requisites: Microsoft Dynamics 365 Business Central Microsoft PowerApps Steps: 1. Create a custom entity within Common Data Service(CDS) whose data you want to retrieve from Business Central. 2. Add the fields with their required data types. 3. Get Data from Business Central using OData Integration. 4. Go to web services in Business Central, add the custom page in the web services and use its OData V4 URL.  5.Enter the OData URL and the Organization credentials. 6. You will be shown the list of tables in each and every company. 7. Go to the table whose data you want to get into PowerApps, and select that table. 8. Next is to select the entity to be mapped with this table and field by field mapping of the same. 9. Refresh can be set manual or automatically, if automatic then select the time. 10. Create a list structure to dsiplay the table.

Share Story :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange