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

Category Archives: D365 Business Central

Getting Started with the Event Recorder in Business Central

When developing customizations or extensions in Microsoft Dynamics 365 Business Central, working with events is a best practice. Events help ensure your code is upgrade-safe and cleanly decoupled from the standard application code. However, one common challenge developers face is figuring out which events are triggered during certain actions in the system. That’s where the Event Recorder comes in. What Is the Event Recorder? The Event Recorder is a built-in tool in Business Central that allows developers to monitor and log all published and subscribed events during a user session. Think of it as a “black box” recorder for event-driven development. It helps you identify: This tool is extremely helpful when you’re customizing functionality using event subscriptions (as per AL best practices) but aren’t sure which event to subscribe to. Why Use the Event Recorder? Traditionally, developers had to dig through AL code or documentation to find the right event to subscribe to. With the Event Recorder, this becomes faster and more efficient. Key benefits include: How to Use the Event Recorder Here’s a step-by-step guide: Step 1: Open Event Recorder Step 2: Start a New Recording Step 3: Stop Recording Step 4: Review the Results Best Practices Sample Use Case Suppose you’re trying to add custom logic every time a Sales Invoice is posted. You’re not sure which event gets triggered at that point. Using the Event Recorder: Now, you can write a subscriber in your AL code like this: [EventSubscriber(ObjectType::Page, Page::”Customer List”, ‘OnAfterGetRecordEvent’, ”, true, true)] local procedure MyProcedure() begin // Your custom logic here end; Limitations While powerful, the Event Recorder does have some limitations: To conclude, Event Recorder is an indispensable tool for any AL developer working in Business Central. It simplifies the discovery of relevant events, helps maintain clean and upgrade-safe extensions, and boosts overall development efficiency. Whether you’re new to AL or a seasoned developer, incorporating the Event Recorder into your workflow will save you time. 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 :

How to Send Emails with CC and BCC in Business Central Using AL Language

Sending emails programmatically in Microsoft Dynamics 365 Business Central (BC) is a common requirement for customization be it sending invoices, reminders, or notifications. With the release of enhanced email capabilities in recent versions, AL developers can now include CC (Carbon Copy) and BCC (Blind Carbon Copy) recipients when sending emails. In this blog, we’ll walk through how to send an email in Business Central using AL and how to include CC and BCC fields effectively. Steps to Achieve goal: Code for example. procedure SendInvoiceEmail(var PurchaseInvHeader: Record “Purch. Inv. Header”): BooleanvarEmailAccount: Codeunit “Email Account”;EmailMessage: Codeunit “Email Message”;Email: Codeunit Email;PurchaseInvLine: Record “Purch. Inv. Line”;Vendor: Record Vendor;Item: Record Item;Currency: Record Currency;CurrencySymbol: Text;ItemDescription: Text[2048];ItemNumber: Code[30];TotalAmount: Decimal;Link: Text[2048];EmailType: Enum “Email Recipient Type”;begin// Get vendor informationVendor.SetRange(“No.”, PurchaseInvHeader.”Buy-from Vendor No.”);if Vendor.FindFirst() then; // Process purchase invoice linesPurchaseInvLine.SetRange(“Document No.”, PurchaseInvHeader.”No.”);PurchaseInvLine.SetFilter(Quantity, ‘<>%1’, 0);if PurchaseInvLine.FindSet() then repeat Item.Reset(); Item.SetRange(“No.”, PurchaseInvLine.”No.”); Item.SetRange(“Second Hand Goods”, true); // Example filter if Item.FindFirst() then begin ItemDescription := PurchaseInvLine.Description; ItemNumber := PurchaseInvLine.”No.”; TotalAmount += PurchaseInvLine.”Amount Including VAT”; Currency.SetRange(Code, PurchaseInvHeader.”Currency Code”); if Currency.FindFirst() then CurrencySymbol := Currency.Symbol else CurrencySymbol := ‘€’; // Default symbol end; until PurchaseInvLine.Next() = 0; // Generate a form link with dynamic query parameters (example only)Link := ‘https://your-form-url.com?vendor=’ + Vendor.”No.” + ‘&invoice=’ + PurchaseInvHeader.”No.”; // Create and configure the emailEmailMessage.Create( Vendor.”E-Mail”, ‘Subject: Review Your Invoice’, ‘Hello ‘ + Vendor.Name + ‘,<br><br>’ + ‘Please review the invoice details for item: ‘ + ItemDescription + ‘<br>’ + ‘Total: ‘ + Format(TotalAmount) + ‘ ‘ + CurrencySymbol + ‘<br>’ + ‘Form Link: <a href=”‘ + Link + ‘”>Click here</a><br><br>’ + ‘Best regards,<br>Your Company Name’, true // IsBodyHtml); // Add BCC (could also use AddCc)EmailMessage.AddRecipient(EmailType::BCC, ‘example@yourdomain.com’); // Update invoice status or flags (optional business logic)PurchaseInvHeader.”Custom Status Field” := PurchaseInvHeader.”Custom Status Field”::Started;PurchaseInvHeader.Modify(); // Send the emailexit(Email.Send(EmailMessage)); end; To conclude, sending emails directly from AL in Business Central is a powerful way to streamline communication with vendors, customers, and internal users. By leveraging the Email Message and Email codeunits, developers can easily customize the subject, body, and recipients, including support for CC and BCC fields. This flexibility makes it easy to automate notifications, document sharing, or approval requests directly from your business logic. Whether you’re integrating forms, sending invoices, or just keeping stakeholders in the loop, this approach ensures your extensions are both professional and user-friendly. With just a few lines of code, you can improve efficiency and enhance communication across your organization. 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 :

Transforming Financial Operations: The Strategic Impact of Customer Payment Registration in Dynamics 365 Business Central

When customers make electronic payments to your bank account, you should take the following steps: Use the Register Customer Payments page to reconcile internal accounts using actual cash figures, ensuring all payments are collected accurately. This functionality allows you to quickly verify and post individual or lump-sum payments, handle discounted payments, and identify unpaid documents. For different customers with varying payment dates, payments must be posted individually. However, payments from the same customer with the same payment date can be posted as a lump sum. This is particularly useful when a single payment covers multiple sales invoices. Pre-requisites Business Central onCloud Steps: Search for “Register Customer Payments” Since different payment types can be posted to different balancing accounts, it is necessary to select a balancing account on the Payment Registration Setup page before processing customer payments. If you consistently use the same balancing account, you can set it as the default to streamline the process and skip this step each time you open the Register Customer Payments page. Check the Payment Made box on the line corresponding to the posted document for which the payment has been made. Use Post payment option to post regular payment (Non Non-Lump). You can use the preview action to verify entries before payment post. Lump payment: Payment information is posted for documents on lines where the Payment Made checkbox is checked. The payment entries are recorded in the general ledger, bank, and customer accounts, with each payment applied to its corresponding posted sales document. To conclude, effectively managing customer payments is crucial for maintaining accurate financial records and ensuring smooth business operations. Microsoft Dynamics 365 Business Central offers a robust and flexible platform to streamline the payment registration process, empowering businesses to efficiently reconcile accounts, post payments, and handle diverse payment scenarios. By leveraging features like the Register Customer Payments page, businesses can save time, reduce errors, and maintain a clear view of their financial health. Whether it’s managing individual payments, lump-sum transactions, or discounted invoices, Dynamics 365 provides the tools needed to adapt to your organization’s unique requirements. With proper setup and utilization of its payment registration features, businesses can enhance their financial workflows, foster better customer relationships, and drive long-term growth. 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 :

Generate Enhanced QR Codes in Business Central Using AL and QuickChart API

QR codes have become a standard tool for sharing data quickly and efficiently—whether it’s for product labeling, document tracking, or digital payments. Now, you can generate customized QR codes and barcodes directly within Microsoft Dynamics 365 Business Central using a simple action. This feature allows users to choose the barcode type and size, embed the image into a record, and optionally download it—all with just a few clicks. It’s an easy way to enhance records with scannable information, without leaving Business Central or needing external tools. In this article, we’ll walk through how this feature works and how it can be used in real business scenarios. What This Feature Does? The “Generate Enhanced QR Code” action gives users the ability to quickly create and manage barcodes within Business Central. Here’s what it can do: Business Scenarios Where This Shines AL Code Behind the Feature Output: Choose an image size (Small, Medium, Large). Select a barcode type (QR, Swiss QR, Aztec, Data Matrix, Telepen). Store the generated image in the Picture field of the item record. To conclude, this customization shows how a simple AL code extension can greatly boost efficiency in Microsoft Dynamics 365 Business Central. By enabling quick generation and embedding of QR codes and barcodes, you eliminate manual steps and streamline processes across departments—from inventory to sales and beyond. With support for multiple barcode types, customizable sizes, and built-in download and validation prompts, this feature brings powerful functionality right into the user’s workflow—no external tools needed. Whether you’re in warehousing, retail, manufacturing, or pharma, this tool helps standardize product labeling and enhances traceability with just a few clicks. Looking ahead? You can extend this further by including additional record fields, customizing encoding logic, or supporting more document types like purchase orders or invoices. 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 :

Choosing the Right WIP (Work in Progress) Method for Your Business Central Projects

Managing projects in Microsoft Dynamics 365 Business Central isn’t just about tracking tasks—it’s about timing your revenue and cost recognition. That’s where WIP (Work in Progress) methods come into play. Whether you’re in construction, services, or implementation—your project accounting can get messy fast. WIP helps clean that up. Let’s explore the five WIP methods through simple scenarios to help you choose the right one. 5 WIP Methods in Business Central—With Scenarios! 1. Cost Value “I spend a lot upfront, billing comes later.” This method calculates WIP based on actual project costs. It defers those costs to the balance sheet until you’re ready to recognize them.  Scenario: You’re building a factory. You spend ₹25 lakh on materials and labor in the first 3 months but won’t invoice the customer until completion. You don’t want those ₹25 lakh to hit your P&L yet. What happens: Costs get moved to a WIP account, so your P&L stays clean. WIP = Costs Incurred 2. Sales Value “I raise invoices early—before completing work.” This method calculates WIP based on billable sales value, regardless of actual cost incurred.  Scenario: You sign a ₹20 lakh IT project. In Month 1, you invoice ₹5 lakh for kickoff and initial planning—even though you’ve barely incurred costs. What happens: That ₹5 lakh revenue sits in the WIP account until you’ve actually done that much work. WIP = Revenue Billed (or Billable) – Work Performed 3. Cost of Sales “I bill monthly and want a straightforward approach.” Here, there is no WIP. Costs and revenues hit your P&L as soon as they’re posted. Scenario: You run a monthly maintenance contract. Every month, you invoice ₹1 lakh and spend ₹70,000 on service staff. What happens: Both ₹1 lakh and ₹70,000 show up in your P&L that month—no balance sheet entries, no deferrals. Simple: Revenue – Cost = Monthly Profit 4. Percentage of Completion (POC) “I want my financials to reflect actual progress.” This method tracks job progress and calculates revenue based on how much of the job is completed. Scenario: You’re doing a ₹60 lakh construction job. You’ve completed 40% of the work and spent ₹20 lakh so far. Your system calculates revenue as 40% of ₹60 lakh = ₹24 lakh. What happens: Business Central adjusts both revenue and cost based on progress—not just what’s billed or spent. % Completion = Actual Cost ÷ Estimated Cost Recognized Revenue = % Completion × Contract Value 5. Completed Contract “I only recognize anything after the job is fully done.” This method holds everything—revenue and cost—until the project is completed. Scenario: You’ve been hired to deliver a complex machine. The contract clearly states: “No billing or revenue recognition until handover.”  What happens: You might spend ₹10 lakh and do months of work—but nothing shows up in your P&L until the machine is delivered and accepted. Recognize all revenue and cost only at job completion Quick Table Comparison WIP Method Recognizes Costs Recognizes Revenue Scenario Style Cost Value Deferred Deferred Spend-heavy, bill-later projects Sales Value Deferred Based on billing Invoice-early, delivery-later Cost of Sales Immediate Immediate Simple monthly billing Percentage of Completion Gradual Gradual Long-term projects with clear phases Completed Contract At Completion At Completion Strict final delivery-based billing Over to you! Which WIP method do you think suits your projects? Have you used Percentage of Completion before? Or do you prefer a simpler Cost of Sales approach? 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 :

Out-of-the-Box or Open-Source? Choosing Between Business Central and Odoo

As businesses grow, the need for a solid, scalable ERP system becomes clear. Two popular names  frequently pop up in these  exchanges Microsoft Dynamics 365 Business Central and Odoo. Both have their strengths, and both  pledge to streamline operations but the real question is which one’s the better fit for your business? Let’s break it down — not in tech slang, but in real- world, business- leader language. The Core Philosophy Business Central is a Microsoft product built for businesses that want a solid, all-inclusive ERP solution with advanced financial capabilities and seamless Microsoft 365 integration. Odoo, on the flip side, is modular and open-source. It appeals to businesses that need a flexible system they can customize heavily to match specific processes. What Business Leaders Need to Know  Business Central feels familiar to anyone who is worked with Excel, Outlook, or brigades. It’s designed to “just work” within the Microsoft ecosystem, which lowers the learning curve. Odoo’s interface is clean and ultramodern, but it can take a bit further trouble to set up and learn — especially if you’re customizing heavily.  Business Central offers rich out- of- the- box functionality, especially when it comes to finance, supply chain, and  force. utmost-sized businesses find that they do n’t need  important customization to get started. With Odoo, you get the basics and  also  make from there. It shines when you need  commodity  veritably specific, but this also means  further  outspoken work.  This is where Odoo really shines. You can tweak nearly every part of it. But with great inflexibility comes great responsibility — meaning further involvement from inventors. Business Central allows customization too, but within  rails. It’s more structured, which means smaller surprises  latterly on.  If your company already relies on Microsoft products, Business Central integrates effortlessly—Teams, Power BI, Excel, and more. Odoo integrates too, but you might need additional connectors or custom development to get everything working smoothly.  Business Central is  erected for businesses that are  spanning  presto. It’s used by companies with hundreds of  druggies and supports complex financials, global operations, and strict compliance  requirements. Odoo is great for startups and small businesses, and it can grow but there’s a point where scaling can come more complex, especially if heavy customization is involved. What About Cost? Odoo has a character for being more affordable  outspoken, especially the open- source  interpretation. But keep in mind customization, hosting, and ongoing support can add up. Business Central might look more  precious on paper, but it comes with stability, security, and  erected- in integrations that reduce the need for bolt- on  results.  So Which One’s Right for You?  Choose Business Central if you  Choose Odoo if you To conclude, there’s no universal “best ERP”—only the best one for your business. Business Central and Odoo both offer strong value, but suit different types of organizations. Still unsure? Let’s have a conversation. For more information on Microsoft products, you can reach out to us at transform@cloudfonts.com.

Share Story :

Enhancing Number Series in Business Central: New Architecture and Copilot Integration

As Business Central continues to advance, its features and functionalities are also evolving. One significant enhancement is the introduction of a new series system. This update is designed to simplify the process of assigning numbers to various documents, ensuring both consistency and efficiency. In this blog, we’ll explore the core aspects of this new number series and how you can leverage it in your Business Central environment. Understanding the Basics Number series in Business Central serve as unique identifiers for documents such as sales orders, purchase orders, and invoices. These identifiers play a crucial role in effectively tracking and managing documents. With the introduction of the new number series, improvements have been made to enhance flexibility and provide better control over these identifiers. What’s New? Previously, Business Central used the NoSeriesManagement codeunit for managing number series. The updated system introduces two distinct entities: This new structure brings a more organized and streamlined approach to number series management, enabling enhanced customization for different document types and processes. Refactoring Your Code With these updates, the NoSeriesManagement codeunit is now marked for deprecation. When you use it, you may encounter a warning like: “Codeunit ‘NoSeriesManagement’ is marked for removal. Reason: Please use the ‘No. Series’ and ‘No. Series – Batch’ codeunits instead. Tag: 24.0”. Here’s a step-by-step guide to refactoring your code for the new system: 1. Identify Usage First, locate all instances where the NoSeriesManagement codeunit is referenced in your codebase. This includes direct calls or any references to its functions. 2. Replace with New Codeunits Update these references to use the appropriate new codeunit: How to Implement the New Codeunits a. Using “No. Series” This codeunit is used for standard number series management tasks. Below is an example of how it works: var    NoSeries: Codeunit “No. Series”;begin    NoSeries.GetLastNoUsed();    NoSeries.GetNextNo();end; b. Using “No. Series – Batch” The “No. Series – Batch” codeunit is designed for efficient batch processing of multiple number series. Use its methods like PeekNextNo to retrieve the next number without modifying the series. var    NoSeriesBatch: Codeunit “No. Series – Batch”;begin    NoSeriesBatch.GetLastNoUsed();    NoSeriesBatch.PeekNextNo();end; Example: Before and After Refactoring Before Refactoring: After Refactoring: Suggesting No. Series Using Copilot in Business Central Business Central’s Copilot integration simplifies generating and managing No. Series for different modules. Follow this step-by-step guide to utilize this feature effectively: 2. Create a New Number Series 3. Generate Number Series for a Specific Module 4. Modify an Existing Number Series 5. Prepare Number Series for the Next Year This feature empowers users to efficiently manage No. Series with minimal manual effort, ensuring consistency and saving valuable time. Explore the Copilot suggestions to optimize your workflow in Business Central! To conclude, the advancements in Business Central’s Number Series management, with the introduction of the new architecture and Copilot integration, offer a significant leap in flexibility, efficiency, and user experience. The updated “No. Series” and “No. Series – Batch” codeunits streamline workflows, while Copilot simplifies the creation, modification, and futureproofing of number series with intelligent suggestions. By adopting these features, businesses can ensure consistency, reduce manual errors, and save valuable time, making their operations more streamlined and future ready. Explore these enhancements today to unlock the full potential of Business Central! 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 – 6

In the pharmaceutical industry, quality doesn’t stop at the first inspection. Even after raw materials (RM) and finished goods (FG) pass initial testing, they may need to be retested over time to ensure they still meet quality standards. Retesting is done for various reasons—checking product stability, verifying shelf-life, or re-evaluating materials due to storage issues. If not managed properly, it can lead to delays, compliance risks, or even wasted inventory. With our GMP-compliant Quality module in Business Central, the retesting process becomes more structured and efficient. In this blog, we’ll look at how the system helps identify items due for retesting, track test results, and make informed inventory decisions. Items due for retesting Once the QA user completes the quality process and posts the inspection receipt, the system stores the retesting date on the item ledger entry. This ensures that retesting requirements are properly recorded and can be tracked throughout the product lifecycle. Retesting Worksheet The next step is to track and manage items due for retesting. Business Central simplifies this with the Retesting Worksheet, which allows QA teams to efficiently identify materials and products that need to be retested. With this approach, retesting becomes a structured and automated process, helping pharma companies stay compliant and maintain quality without operational bottlenecks. 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 :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange