Friday, 14 July 2023

"Unveiling the Mystery: Forex Revaluation Entries Posted Outside End-of-FY in Business Central - What Could Be the Reasons?"

 Hello reader,

I encountered the above problem when i ran forex revaluation.


Certainly! Here are two key points to address the issue of invoices applied to post-FY payments/receipts in Business Central:
Issue: Invoices falling within the previous financial year were paid and applied to payments/receipts posted after the financial year ended, leading to discrepancies in financial reporting.
Solution: Un-applying the receipts and payments. By reversing the application process, we can remove the linkage between the invoices and the post-FY transactions, ensuring accurate financial records
Action Steps:
a. Identify the invoices that were applied to post-FY payments/receipts and determine the correct financial period they should be associated with.
b. Un-apply the affected receipts and payments associated with those invoices. This will detach them from the incorrect financial period.
c. Re-apply the receipts and payments to ensure they are correctly assigned to the appropriate financial year, maintaining accurate financial reporting.
By following these steps, we can resolve the issue of invoices applied to post-FY payments/receipts and ensure the integrity of your financial data in Business Central. If you require further assistance, don't hesitate to reach out for support.

Wednesday, 7 June 2023

Why the fields you added to the child extension in business central do not show in the parent extension using AL

Resolving Field Access Issues in Parent Extensions for Microsoft Dynamics 365 Business Central

Introduction: As a Business Central developer, it is not uncommon to encounter challenges when working with extensions, particularly when accessing fields in child extensions from parent extensions. In this article, we will address a common issue where newly added fields in a child extension are not accessible in the parent extension. We will provide a solution to ensure smooth integration and seamless access to these fields within the parent extension.

Solution:

  1. Update the Child Extension Version: To begin, it is crucial to update the version of the child extension in the app.json file. For example, if the current version is 1.0.0.0, increment it to 1.0.0.1. This version update ensures that the latest changes are recognized and applied throughout the system.

  2. Update Parent Extension Dependencies: Next, update the dependencies in all parent extensions to reflect the new version of the child extension. This step establishes the necessary connection between the parent and child extensions, allowing for proper integration and field access.

  3. Compile, Package, and Publish the Child Extension: After updating the version and dependencies, proceed to compile, package, and publish the child extension. This step ensures that the extension's changes are properly bundled and deployed for use in the Business Central environment.

  4. Download Symbols in Parent Extensions: To enable seamless communication between the parent and child extensions, it is essential to download symbols in the parent extensions that have a dependency on the child extension. Symbol downloading facilitates the recognition and utilization of the updated fields.

  5. Package and Publish the Parent Extension: Finally, package and publish the parent extension, incorporating the changes made in the child extension. This process allows the parent extension to recognize and access the newly added fields successfully.

Conclusion:

By following these steps, you can resolve field access issues encountered when working with parent and child extensions in Microsoft Dynamics 365 Business Central. Remember to exercise caution and perform these operations on a test environment before applying them to a production environment. Maintaining a comprehensive backup of your database is also crucial to mitigate any potential risks associated with these modifications.

As a Business Central developer, it is essential to be equipped with the knowledge and expertise to address these types of challenges. By implementing this solution, you can ensure a smooth and efficient integration of extensions, enabling optimal functionality within the Business Central environment.

Good luck!!

Tuesday, 3 January 2023

How to substitute a default report with a custom report in Business Central on premise

 

Hello Reader,
If you are reading this then probably you have been checking a couple of resources to find a solution to the stated issue.
I had a similar challenge and after spending a couple of hours checking online resources, I found it very easy !
    
https://microsoft-dynamicsnav.blogspot.com/


Follow these steps.

Create your custom report in a new extension. If you don't know how to create extensions follow this
After creating your Custom report in the extension, you will have to create a code unit with subscriber event to codeunit Report management.

Just publish and run your extension. You should have your reports substitution successful
Here is a sample 
codeunit 100 "GP Base Report Substittuion"
{
    trigger OnRun()
    begin

    end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement,
'OnAfterSubstituteReport', '', false, false)]
    local procedure OnSubstituteReport(ReportId: Integer; var NewReportId: Integer)
    begin
//Reminder is the name of the default report object in Business Central
        if ReportId = Report::Reminder then
            NewReportId := Report::GPReminder;
//GPReminder is the name of the custom report you created to substitute the default
// report
    end;
}

Tuesday, 17 May 2022

Microsoft Dynamics 365 Business Central. The request for path failed with code NotFound. Reason: Not Found



Your Error log could show something like this

 If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.

Sending request to http://localhost:-------BC190/dev/metadata?tenant=default

Error: Could not connect to the server. Please verify that:

1. The server is started.

2. The development endpoint is enabled (DeveloperServicesEnabled server setting).

3. The service name matches the one specified in the URL.

4. The port number matches the one specified in the URL (DeveloperServicesPort server setting)


Option 2 resolved the problem.


Good luck

Sunday, 27 March 2022

Configuring Business Central (Business Central Server & Business Central Web Server)

Hello there,
If you are moving from the old Dynamics NAV days over the new Business Central Version 19 & above,
you have encountered a bit of challenge getting the baby to display in the web browser.
In the old days you only needed to install NAV client. Then any new instances would be created via Microsoft Dynamics Management client.
This time you need to configure Business Central Server
You also Configure Business Central Web sever & point it to the BC server


Use the following links to setup the web server

Good luck

 

Wednesday, 6 October 2021

Send a sales order as PDF attachment in Microsoft Dynamics NAV 2017

 Hello reader here is the code snippet to achieve the above


//Check the sender's email

IF UserSetup.GET(USERID) THEN

  EmailID := UserSetup."E-Mail"//Get the sender's email adress from Approval user setup table

ELSE

  ERROR(MSL0001,USERID);//Display error is the address above is not found

SMTPMailSetup.GET;// table 409

SaleTable.RESET;// Sales header table 36

SaleTable.SETRANGE("Document Type",SaleTable."Document Type"::Order);

SaleTable.SETRANGE("No.",SalesOrder."No.");


IF UserSetup.GET(USERID) THEN

  EmailID := UserSetup."E-Mail"

ELSE

  ERROR(MSL0001,USERID);


IF SaleTable.FINDFIRST THEN BEGIN

  SalesOrderDoc.SETTABLEVIEW(SaleTable);

  FileName := FileMgt.ServerTempFileName('pdf');//Defining the report attachment type [FileName is Text variable]

  REPORT.SAVEASPDF(50071,FileName,SaleTable);// 50071 is the report ID for the sales order confirmation report

  CLEAR(SMTPMail);// Code Unit 400

  SMTPMail.CreateMessage(USERID,SMTPMailSetup."User ID",EmailID,'Booked Sales Order','Please find order confirmation '+SalesOrder."No.",TRUE);

  SMTPMail.AddAttachment(FileName,'Sales Order '+SalesOrder."No."+'.pdf');// Adds the report as attachment


  SMTPMail.AppendBody('<br>');

  SMTPMail.AppendBody('Kindly find the attachment ');

  SMTPMail.AppendBody('<HR>');

  SMTPMail.AppendBody('This is a system generated mail. Please do not reply to this mail!');

  SMTPMail.Send;

  MESSAGE('Mail Sent');

END;



Thats it. Good luck

Credit CloudFonts

Tuesday, 5 October 2021

Error 'The value 01/07/21 cant be evaluated into type date'




 I happened to encounter the above error. The rest of the users can run the same report without any issue. The problem is isolated to just this single user.

First i noticed the date format on the users PC is set to dd/mm/yy.

  • To resolve the issue, change the date format to mm/dd/yy on the user's PC
  •  Run the report, clear any date filters that are set on the report request page
  • close the report
  • Change the date format settings back to dd/mm/yy on the PC
  • Close NAV and restart NAV
  • The issue should be resolved