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

Category Archives: D365 Business Central

Phases of Quality Control in Business Central – 5

In our previous posts, we covered the key stages of production—planning, creating orders, managing materials, and reviewing the final product. Now, let’s focus on an important next step: quality control of Finished product. Quality control is not something we just do at the end of the process; it’s crucial to making sure our products meet the high standards our customers expect. In this post, we’ll explain the essential steps involved in quality control, from inspections to ensuring everything follows the right rules, all to make sure only the best products are delivered. Let’s dive into how we keep our products up to standard and protect the reputation of our brand! Released production order System will automatically create Inspection datasheet with all the item details and list of specification. Inspection Datasheet Inspection Receipt Posted inspection receipt To conclude, our comprehensive quality control, driven by inspection datasheets and receipts, delivers excellent products, traceable records, and customer confidence through verifiable results and Certificates of Analysis. I Hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Implementing Encryption and Decryption Functions via API in Business Central

In Microsoft Dynamics 365 Business Central, securing sensitive data like passwords is crucial for protecting both businesses and customers. By the end of this post, you will understand how passwords are encrypted before being stored and decrypted only when necessary. This ensures that passwords remain secure, minimizing exposure and building trust. 1. Storing Encrypted Passwords Passwords are encrypted before being stored in the database to ensure they are protected. This prevents anyone from accessing passwords in plain text, even if they gain unauthorized access to the database. Here’s an example of how a custom table, CFSCustomPage, stores encrypted passwords using the EncodePassword procedure. In the above code, the password is encrypted before being stored in the database to ensure the data remains secure. The EncodePassword procedure is used for encrypting the password. 2. Decrypting Passwords When Needed When passwords need to be retrieved, they are decrypted using the DecodePassword procedure. This ensures that passwords are only accessible when required, minimizing exposure. Here’s the decryption function: In the above code, passwords are decrypted only when needed, allowing the system to securely handle sensitive data. 3. Returning Decrypted Passwords via API For external systems or applications requiring access to customer data, Business Central ensures that passwords are only decrypted and transmitted securely via API. This way, customer information remains protected throughout the process. Here’s how the API Page CFSCustPageAPI handles this: The API exposes the encrypted password and only decrypts it when accessed securely through the API. 4. Returning Decrypted Passwords in a List Page Passwords can also be decrypted and displayed in a list page when necessary, ensuring they are only shown to authorized users. This is done using the DecodePassword function in the page CFSCustomPage, as shown below: This page allows authorized users to view encrypted passwords, MD5, SHA1, SHA512, and AES encrypted passwords, and also decrypt them when necessary. 5. Best Practices for Password Security 6. Encryption Types Used in the System Here are the different types of encryptions and hashing methods used in Business Central: Code: table 71983576 CFSCustomPage {     Caption = ‘CustomPage’;     DataClassification = ToBeClassified;     fields     {         field(71983575; “No.”; Code[20])         {             Caption = ‘No.’;             DataClassification = CustomerContent;         }         field(71983576; Name; Text[50])         {             Caption = ‘Name’;             DataClassification = CustomerContent;         }         field(71983577; Password; Text[365])         {             Caption = ‘Password’;             DataClassification = CustomerContent;         }     }     keys     {         key(PK; “No.”)         {             Clustered = true;         }     }     // Procedure to encode (encrypt) a password     [ServiceEnabled]     procedure EncodePassword(var Password: Text[365])     var         EncryptedPassword: Text[365];     begin         // Encrypt the password using the Encrypt function         EncryptedPassword := Encrypt(Password);         // Assign the encrypted password back to the Password field         Password := EncryptedPassword;     end;     // Procedure to decode (decrypt) the password     [ServiceEnabled]     procedure DecodePassword(EncryptedPassword: Text[365]): Text     var         DecryptedPassword: Text;     begin         // Decrypt the password using the Decrypt function         DecryptedPassword := Decrypt(EncryptedPassword);         // Return the decrypted password         exit(DecryptedPassword);     end;     // Procedure to generate MD5 hash of a password     procedure MD5Hash(Pwd: Text): Text     var         CryptographyManagement: Codeunit “Cryptography Management”;         HashAlgorithmType: Option MD5,SHA1,SHA256,SHA384,SHA512;     begin         // Generate and return the MD5 hash of the password         exit(CryptographyManagement.GenerateHash(Pwd, HashAlgorithmType::MD5));     end;     // Procedure to generate SHA1 hash of a password     procedure SHA1(Pwd: Text): Text     var         CryptographyManagement: Codeunit “Cryptography Management”;         HashAlgorithmType: Option MD5,SHA1,SHA256,SHA384,SHA512;     begin         // Generate and return the SHA1 hash of the password         exit(CryptographyManagement.GenerateHash(Pwd, HashAlgorithmType::SHA1));     end;     // Procedure to generate SHA512 hash of a password     procedure SHA512(Pwd: Text): Text     var         CryptographyManagement: Codeunit “Cryptography Management”;         HashAlgorithmType: Option MD5,SHA1,SHA256,SHA384,SHA512;     begin         // Generate and return the SHA512 hash of the password         exit(CryptographyManagement.GenerateHash(Pwd, HashAlgorithmType::SHA512));     end;     // AES Encryption and Decryption example     procedure AESEncryptionExample(Passowrd: Text): TEXT     var         RijndaelCryptography: Codeunit “Rijndael Cryptography”;         Base64Convert: Codeunit “Base64 Convert”;         EncryptedText: Text;         DecryptedText: Text;         SecretTexts: SecretText;     begin         // Convert the encryption key ‘1106198321061984’ to Base64 format and store it in SecretTexts         SecretTexts := Base64Convert.ToBase64(‘1106198321061984’);         // Set the encryption key and initialization vector (IV) using Base64-encoded values         RijndaelCryptography.SetEncryptionData(SecretTexts, Base64Convert.ToBase64(‘ITGateWayXyZ1234’));         // Set the AES block size to 128 bits (standard AES block size)         RijndaelCryptography.SetBlockSize(128);         // Set the cipher mode for AES to CBC (Cipher Block Chaining)         RijndaelCryptography.SetCipherMode(‘CBC’);         // Set the padding mode for AES encryption to PKCS7 (standard padding scheme for block ciphers)         RijndaelCryptography.SetPaddingMode(‘PKCS7’);         // Encrypt the password using AES encryption         EncryptedText := RijndaelCryptography.Encrypt(Passowrd);         // Decrypt the encrypted password using … Continue reading Implementing Encryption and Decryption Functions via API in Business Central

Share Story :

Driving Efficiency with Automation: Transforming Sales Processes with Recurring Invoices in Microsoft Dynamics 365 Business Central

Businesses regularly invoice customers and require an efficient method to generate these invoices simultaneously. Microsoft Dynamics 365 Business Central offers a feature called “Create Recurring Sales Invoices,” which enables the batch creation of sales invoices for multiple customers using predefined recurring sales lines. Pre-requisites Business Central onCloud Configuration: To set up recurring sales lines. Search globally “Recurring sales lines” and choose the related link. Now select the “New” action and fill in the fields as necessary. There are some fields that are missing like Amount you can add it by Personalization and fill in the necessary data. Now assign recurring sales line template codes to customers that you want to create invoices for them. Now search for “Create recurring sales invoices”. On the Create recurring sales invoices page fill necessary data. In the Code filter field, enter the code for standard sales lines that are assigned to a customer that you want to create sales invoices for. You can see sales invoices are created for the customers with the specified sales invoice template code. To conclude, Microsoft Dynamics 365 Business Central’s recurring sales lines feature streamlines the creation of sales documents for transactions that occur regularly. By setting up standard sales lines and assigning them to customers, businesses can automate the insertion of these lines into sales documents, enhancing efficiency and reducing manual entry errors. This functionality is particularly beneficial for managing recurring orders, ensuring consistency, and saving time in the sales process. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Leveraging Business Central’s Income Statement for Strategic Financial Insights

In today’s fast-paced business environment, reliable financial reporting is not just a compliance requirement it’s a strategic necessity. Organizations of all sizes, across industries, must make informed decisions quickly to stay competitive, manage risks, and ensure long-term sustainability. At the heart of this financial clarity lie two fundamental reports: the Income Statement and the Balance Sheet. The Income Statement provides a snapshot of an organization’s financial performance over a specific period detailing revenues, expenses, and profits. It answers the critical question: “Are we making money?” We’ll cover the customer journey from implementation to insight-driven strategy and include key steps and best practices. Steps to Achieve goal: Step 1: Understanding the Need – for any Financial Complexity Before deploying any tool, Team should identified key challenges in their financial operations: Step 2.: Configuring the Income Statement Once the foundational setup was complete, configuring the Income Statement enabled the organization to: Configuration Steps: 3. Enable Dimensional Reporting: Use dimensions to drill down into cost centers. 4. Schedule Reports: Automate delivery to leadership teams for weekly snapshots. Step 3: Real-Time Financial Monitoring One of the most significant value propositions for any system is providing real-time visibility. Key Features in Action: Step 4: Strategic Decision-Making with Insights Optimize Routes: Identify profitable vs. underperforming flight paths Financial Reporting Best Practices for Modern Enterprises To conclude, accurate and timely financial reporting is essential for informed decision-making and long-term business success. With tools like Microsoft Dynamics 365 Business Central, enterprises can turn financial data into strategic insights that drive growth and efficiency. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Phases of Quality Control in Business Central – 4

In our previous blog, we walked you through the process of procuring high-quality raw materials and the essential quality checks that ensure only the best make it to production. Now that we’ve laid the groundwork, it’s time to ask: What happens next? How do we turn those raw materials into timely deliveries for our customers? That’s where the planning of sales orders comes in! In this blog, we’ll dive into the crucial steps of sales order planning, discussing how we manage demand, and ensure a seamless flow from order placement to delivery. Let’s take a closer look at how this next phase keeps everything running smoothly! Firm plan production order Released production order A Released Production Order in Business Central indicates that the production order has been finalized and is ready to begin production. Once released: Material Issue Production Journal We will continue the Finished good quality in the next blog! I Hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

From Commit to Inbox: Automating Change Summaries with Azure AI

In our small development team, we usually merge code without formal pull requests. Instead, changes are committed directly by the developer responsible for the project, and while I don’t need to approve every change in my role as the senior developer, I still need to stay aware of what’s being merged.  Manually reviewing each commit was becoming too time-consuming, so I built an automated process using Power Automate, Azure DevOps, and Azure AI.Now, whenever a commit is made, it triggers a workflow that summarizes the changes and sends me an email.This simple system keeps me informed without slowing down the team’s work. Although I kept the automation straightforward, it could easily be extended further.For example, it could be improved to allow me to reply directly to the committer from the email or even display file changes in detail using a text comparison feature in Outlook.We didn’t need that level of detail, but it’s a good option if deeper insights are ever required. Journey We get started with the Azure DevOps trigger “When a code is pushed”. Here we specify the organization name, project name and repository name. We can also specify a specific branch if we want to limit our tracking to simply that branch otherwise it tracks all the available branches to the User. Then we have a foreach loop that iterates over the “Ref Updates” object array. It contains a list of all the changes but not the exact details.This action pops up automatically as well when we configure the next action. Then we set up a “Azure DevOps REST API request to invoke” action. This has connection capabilities to Azure DevOps directly so it is better to use over a simple REST API action. We specify the relative URL as {Repository Name}/_apis/git/repositories/{Repository ID}/commits/{Commit ID}/changes?api-version=6.0 The Commit ID shows up as newObjectId in the “When code is pushed” trigger. Then we pass the output of this action to a “Create Text with GPT using a prompt” action under the AI Builder group.I’ve passed the prompt as below but it took several trials and errors to get exactly what I wanted. The last action is a simple “Send an email” one where I’ve kept myself as a recepient and I’ve added a subject and a body. Now to put it all together and run it – And here is the final output – When the hyperlinks are clicked they take me straight to azure while pointing to the file which is referred. For instance, if I click on the Events Codeunit – Conclusion Summarizing commit changes is just one way automation can make life easier.This same idea can be applied to other tasks, like summarizing meeting notes, project updates, or customer feedback.With a bit of creativity, we can use tools like this to cut down on repetitive work and free up time to focus on learning new skills or tackling more challenging projects.By finding smart ways to streamline our workflows, we can work more efficiently and open up more time for growth and development. If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Restoring a Deleted Posted Bank Reconciliation in Business Central: A Comprehensive Guide

Are you having trouble restoring a deleted posted bank reconciliation in Microsoft Dynamics 365 Business Central? In this blog, I’m going to guide you through the process of effectively restoring a deleted posted bank reconciliation and ensuring the accuracy of your financial records. You’ll learn the step-by-step procedure to re-post a deleted bank reconciliation, along with best practices to prevent future errors and maintain the integrity of your financial data. Let’s get started! Steps to Achieve Goal: page 50100 BankLedgerEntryEditable {     ApplicationArea = All;     Caption = ‘Bank Ledger Entry Editable’;     PageType = List;     SourceTable = “Bank Account Ledger Entry”;     UsageCategory = Lists;     Permissions = tabledata “Bank Account Ledger Entry” = RIMD;     layout     {         area(Content)         {             repeater(General)             {                 field(“Document No.”; Rec.”Document No.”)                 {                     ToolTip = ‘Specifies the document number on the bank account entry.’;                 }                 field(“Statement No.”; Rec.”Statement No.”)                 {                     ToolTip = ‘Specifies the bank account statement that the ledger entry has been applied to, if the Statement Status is Bank Account Ledger Applied.’;                 }                 field(“Statement Line No.”; Rec.”Statement Line No.”)                 {                     ToolTip = ‘Specifies the number of the statement line that has been applied to by this ledger entry line.’;                 }                 field(“Statement Status”; Rec.”Statement Status”)                 {                     ToolTip = ‘Specifies the statement status of the bank account ledger entry.’;                 }                 field(Amount; Rec.Amount)                 {                     ToolTip = ‘Specifies the amount of the entry denominated in the applicable foreign currency.’;                 }                 field(“Amount (LCY)”; Rec.”Amount (LCY)”)                 {                     ToolTip = ‘Specifies the amount of the entry in LCY.’;                 }                 field(“Posting Date”; Rec.”Posting Date”)                 {                     ToolTip = ‘Specifies the posting date for the entry.’;                 }             }         }     } } pageextension 50101 PostedBankAccRecon extends “Bank Account Statement List” {     trigger OnDeleteRecord(): Boolean     begin         Error(‘You cannot delete a bank account reconciliation entry.’);     end; } To conclude, by following these steps, you can successfully undo a deleted posted bank reconciliation in Business Central. The process involves editing the Bank Ledger Entry, recreating the bank reconciliation with the same details, and ensuring the previously deleted reconciliation is removed through AL. With this approach, you maintain accurate financial records and ensure that your bank account reconciliation process runs smoothly without any discrepancies. If you need further assistance or have specific questions about your Business Central setup, feel free to reach out for personalized guidance.  Happy Reconciliation! We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Using Copilot for simplifying Sales Quote and Order Lines creation in Dynamics 365 Business Central

Microsoft is rapidly integrating Copilot across its ecosystem, empowering users with AI-driven assistance in various business processes. As enterprise systems become more connected, AI gains deeper access to data, enabling automation that eliminates tedious tasks and lets users focus on strategic decisions. In Dynamics 365, Copilot can help sales teams by generating Sales Quote Lines or Sales Order Lines by providing a rough prompt.  In this blog, we’ll explore how to leverage Copilot for a more efficient sales workflow by taking a sample use case. References Copilot in Business Central Overview Sales Line Suggestions with Copilot Scenario One fine morning your sales team receives an email from a customer who’s looking to try out your product. He sends your team an email. Your team goes to Business Central and creates a Sales Quote. In the lines section, they click on the Copilot button and click on “Suggest lines”. They can add the text the customer sent them directly or with some minor changes. And Copilot will find the best matching item and suggest some lines to the User. You can adjust the matching criteria to your required –  Permissive means that all keywords are optional. This option typically generates the most suggestions. Balanced is a blend of required and optional keywords. This option typically generates fewer suggestions. Precise means that all keywords are required. This option typically generates the fewest suggestions. Fast-foward a few days, the Customer is happy with your product and sends a bigger order. We can paste the entire description again into the suggest lines box. Copilot handles minor mistakes like spelling errors and mismatched totals without any intervention. And your new sales quote is ready! The accuracy of sales lines suggested by Copilot rely heavily on the quality of data present in the system. I’m not sure why Microsoft hasn’t included the same functionality for the Purchase side of things but I’m sure it’s not too far off in the future.  There’s already a BC Idea raised for this (Please vote it!).  If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Seamless Integration: How to Sync Business Central with External Systems Instantly or in Batches

In today’s fast-paced business world, integrating your ERP system (like Business Central) with other external systems is crucial for streamlining processes and ensuring data consistency. However, if you’re new to API integrations or struggling with how to send data from Business Central to another system, don’t worry! In this post, I am going to walk you through the process of sending data from Business Central to an external system using APIs. By the end of this guide, you’ll have a clear understanding of how to perform integrations smoothly, without the complexity. Steps to Achieve Goal: You can easily send data from Business Central to an external system by calling the link set in General Ledger Setup. Below is the logic for sending data via an API. You can encapsulate this logic inside a Codeunit, and call it as needed based on your synchronization requirements: Real-Time Data Sync: If you want the data to be synced in real-time (for example, as soon as new data is entered into Business Central), you can call the procedure within the OnAfterInsert() trigger. This ensures that every time a new record is created, it automatically triggers the procedure to send the data. trigger OnAfterInsert() begin     SendPostRequest(Rec); end; Batch Data Sync: If you prefer to sync the data at the end of a batch process (for example, at the end of the day), you can loop through the records using FindSet() and then call the procedure inside the loop. This will send data in bulk at a scheduled time rather than in real-time. procedure SyncDataInBatch() var     Rec_SO: Record “Sales Header”; begin    Rec_SO.setrange(CreatedAt,today()); // Apply any filter as per your need.     if Rec_SO.FindSet() then         repeat             SendPostRequest(Rec_SO);         until Rec_SO.Next() = 0; end; // Below is the logic for posting data from BC to Third Party Applications via API   procedure SendPostRequest(var Rec_SO: Record “Sales Header”)     var         HttpClient: HttpClient;         HttpContent: HttpContent;         HttpResponseMessage: HttpResponseMessage;         HttpRequestMessage: HttpRequestMessage;         JsonObject: JsonObject;         JsonText: Text;         Rec_GLE: Record “General Ledger Setup”;         contentHeaders: HttpHeaders;         OutPutString: Text;     begin           Rec_GLE.Get();         Rec_GLE.TestField(“API Link”); // where the other system API link has been stored and we are using via AL         HttpRequestMessage.SetRequestUri(Rec_GLE.”API Link”);         HttpRequestMessage.Method := ‘POST’;         JsonObject.Add(‘system_id’, Rec_SO.SystemId); // Passing Sales Header System ID(GUID)         JsonObject.Add(‘document_number’, Rec_SO.”No.”); // Passing Sales Header No         JsonObject.Add(‘type’, ‘ReleasedSalesInvoice’); // Passing Sales Header type         JsonObject.WriteTo(JsonText);         HttpContent.WriteFrom(JsonText);           HttpContent.GetHeaders(contentHeaders);         contentHeaders.Add(‘charset’, ‘UTF-8’);         contentHeaders.Remove(‘Content-Type’);         contentHeaders.Add(‘Content-Type’, ‘application/json; charset=utf-8’);           HttpRequestMessage.Content(HttpContent);         if HttpClient.Send(HttpRequestMessage, HttpResponseMessage) then             if HttpResponseMessage.IsSuccessStatusCode then begin                 HttpResponseMessage.Content.ReadAs(OutPutString);                 Message(‘%1’, OutPutString);             end             else                 Error(‘Error %1’, HttpResponseMessage.ReasonPhrase);     end; Conclusion: To conclude, sending data between Business Central and other systems is not as complicated as it might seem. By following the steps outlined above, you’ll be able to create smooth, efficient integrations that will save time, reduce errors, and improve your business processes. Happy Coding! We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Business Central Translations: Working with XLIFF Files – Part 2

By the end of this guide, you will be able to generate, edit, and implement XLIFF files in Microsoft Dynamics 365 Business Central to support multiple languages seamlessly. This will enable your application to display translated content for UI labels, reports, and messages, ensuring a smooth experience for users across different regions. Why does this matter? Using XLIFF files, businesses can easily localize Business Central applications without modifying source code, making multilingual support efficient and scalable. By leveraging tools like NAB AL Tools, translations can be managed effortlessly, enhancing global usability. Generating an XLIFF File To illustrate the XLIFF process, let’s go through an example where we add a custom field named “Custom_Field” on the Customer Card page. Step 1: Creating a Custom Field First, we create a new field, Custom_Field, on the Customer Card page using AL code: Step 2: Enabling Translation File Feature In the app.json file, ensure that the TranslationFile feature is enabled: Step 3: Building the Project Now, build the extension using the shortcut CTRL + Shift + B. This will generate an .xlf file automatically in the translation folder. By default, the file is generated in English (en-US). Using NAB Extension for Translation To simplify translation tasks, you can install the NAB AL Tools extension from the Visual Studio Code marketplace. This extension helps in managing translation files efficiently by allowing automated translation suggestions and quick file updates. Steps to Use NAB AL Tools: A) Install NAB AL Tools. B) Press CTRL + Shift + P and select NAB: Create translation XLF for new language. C) Enter the language code (e.g., fr-FR for French – France). D) Choose Yes when prompted to match translations from BaseApp. E) A new fr-FR.xlf file will be generated. Translating the XLIFF File To translate the XLIFF file into another language (e.g., French), follow these steps: Example: Translating Report Labels In Business Central RDLC reports, hardcoded text values can also be translated using labels. Instead of writing static text, define labels within the AL code: Using FieldCaption ensures that report labels dynamically adapt to the selected language, improving localization without manual modifications. When switching languages, the label automatically retrieves the corresponding translation from the XLIFF file. Modifying Standard Fields Standard field names in Business Central can also be modified using the BaseApplication.g.xlf file. You can find this file in public repositories, such as: BaseApplication.g.xlf Modifying this file allows changes to default field captions and system messages in multiple languages. Insert value in different languages via AL In Microsoft Dynamics 365 Business Central, AL enables efficient multilingual data handling. The image above illustrates a Customer Card where the “Nom” (Name) field contains the value “testing.” The AL code extends the Customer table, adding a custom field and an onInsert trigger to validate the Name field with “testing.” This ensures data consistency across different language settings. By leveraging AL, developers can automate multilingual field values, enhancing Business Central’s global usability. To conclude, managing translations in Business Central using XLIFF files enables businesses to support multiple languages efficiently. By generating XLIFF files, modifying them for translation, and leveraging tools like NAB AL Tools, businesses can ensure accurate and seamless localization. For further refinements, modifying report labels and system fields enhances multilingual support, improving the user experience across global deployments. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange