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


Sunday, 31 January 2021

Uploading Development License to Business Central V17 on premise

 Hello reader. I would like to share something that took me some minutes to learn.Obviously if you are new to BC moving from older versions of NAV. You are used to importing the development license via development environment. In Business Central V17, things changed a bit, now uploading the license is done via Administration Shell using a few commands.

To make things easy, first move your development license to C:\ directory.

Run Business Central Administration Shell as administrator

Check the existing license information by executing command Export- NavServerLicenseInformation

The system will prompt you for the serverInstance  e.g BC170

Executing the command will display the license information.



Upload the new development license

With you Administration shell open.

  • Run Import-NAVServerLicense command
  • Provide licenseFile path in my case its in C: & the BC17.flf is the file name
  • Provide ServerInstance in my case BC170
  • Restart-NavServerInstance as in preceeding screen shot


You may check whether the new license is uploaded by running the command as in screen below



Good luck!!!

Credit  GoDigit


Friday, 28 August 2020

Dynamics NAV Item Unit Cost over a period

 Hello, i happened to get a request from our team in regards to item unit cost. They wanted to see how the unit cost of a certain item had been changing over a year. After reading on many blogs and trying out a couple of things. Something finally worked. So buckle up for the ride.

  • First, when you open the item card and;
  • Expand the invoicing Fast tab
  • Click assist edit on standard cost for standard cost items or unit cost for items using average cost costing method.
  • The average cost Calculation window/page is displayed.
  • The closing entry on each date shows the adjusted average unit cost for the item as of that date.
  • When you expand one of the closing entries, you see inbound & out bound entries (Un-adjusted) along with the unit cost for the item.


The second option will give us the inventory unit cost (Not adjust as in average cost calc overview) but the unit cost of all inbound entries.

  • Open item card
  • Select Navigate tab on the ribbon of item card
  • Under item availability group, select statistics. Item statistics page is displayed
  • On the general tab of item statistics page.
  • Select "Cost specification" in the show as lines
  • Select "Period" in the show as columns
  • Capture the date range in "Date filter"
  • Select "Calculate cost per unit" in the options fast tab

Then click show matrix


Then the unit cost statistics for the selected date range

Notice the inventory cost (LCY) i consider that as the unit cost.
Read more from community forum 



Friday, 14 August 2020

Dynamics NAV -No report data in report preview mode

 Dear Reader, my report doesn't display data in preview mode. However, when i print the document in PDF, the report prints out well.

I tried reading from a couple of blogs but could not get the cause. After trying out a couple of things something worked out.

  • To solve the problem go to report properties
  • Change the PreviewMode property to PrintLayout

That should solve the issue.

Cheers!!!