Hello reader,
I encountered the above problem when i ran forex revaluation.
Hello reader,
I encountered the above problem when i ran forex revaluation.
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:
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.
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.
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.
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.
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!!
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
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
First i noticed the date format on the users PC is set to dd/mm/yy.