4D Write Pro
Export to PDF with attachments
Regardless of your field—be it legal, technical, medical, accounting, security, construction, public works, or any other profession—if you require archiving documents containing attachments, the PDF/A3 format is the ideal choice.
The PDF/A3 standard enables you to embed numerous attachments within a document. This is made possible by introducing the new export option, .files, categorized under the collection type.
Electronic invoice generation
In 4D V20 R4, 4D Write Pro introduces the possibility of creating electronic invoices.
E-invoices are generated, transmitted, received, and stored electronically, streamlining business transactions while being more eco-friendly. Although handling e-invoices may seem complex, 4D Write Pro simplifies this process.
These invoices often use the PDF/A3 format, allowing XML files to be added. The XML contains invoice details in specific formats like FACTUR-X (France) or ZUGFeRD (Germany). To create these invoices with 4D Write Pro, just include XML files in the PDF/A3 format thanks to the added attributes: the facturX object and the files collection during PDF export. But make sure the XML content is valid before inserting it because 4D Write Pro doesn’t validate it.
Programming-related features
Error handling with try()
In 4D v20 R4, you can now access a helpful new keyword: Try(Expression). This keyword lets you run an expression within parentheses and catch any errors during its execution. These errors can be managed using the Last errors command right after the expression execution. This approach allows you to handle errors as closely as possible where they occur in the code and even use local variables for better error management.
Code Live Checker
4D v20 R4 enhances the coding experience for 4D developers by incorporating a process (named Code Live Checker) that allows the compiler to check syntax and verify class types, class names, function names, and function parameters; this feature aims to prevent errors during execution.
Simplifying Method Parameter Declarations
You can now streamline parameter declarations using method prototypes with the #DECLARE keyword, eliminating the need for redundant declarations in ‘compiler_’ methods. This update in 4D v20 R4 ensures existing code remains unaffected while enhancing code safety by issuing warnings for parameter mismatches. This improvement aims to save time and enhance code quality by preventing runtime errors during compilation.
Custom date and time formats
Dates and times in 4D can be displayed or printed in various ways, typically based on internal resources or system settings. While default formats are generally sufficient, specific needs may demand tailored formatting.
Consider scenarios where documents are intended for destinations with different date and time preferences than the origin country. In such cases, default formats might not align with the recipient’s expectations. Thus, the ability to precisely define date and time displays becomes crucial.
For that, 4D v20 R4 brings new functionalities that make customized formatting easier:
- The String command.
- The OBJECT SET FORMAT command.
- And the interface.
Exporting Structure Definition to HTML
4D now makes it easier to share structure definitions using HTML formatting. Before, it was in the XML+XSL format, which browsers render as HTML. However, recent browser restrictions prevent local files from utilizing certain external resources unless sourced from the web.
Starting from 4D v20 R4, the generated file is in HTML format when you select the “File/Export/Structure definition to HTML…” menu item. This way, the file is ready to be opened by any browser.
Plus, the command EXPORT STRUCTURE lets you export your structure using an optional parameter.
Ensure the integrity of record selections
4D v20 R4 introduces a new feature that ensures records stay consistent with the initial selection criteria during the life of those selections. This means only the selected records, following the initial rules, will be worked on, preventing accidental changes to other data. This reliability helps developers trust that their chosen records won’t unexpectedly change while using the application.
4D Server
Auto-Generated SSL/TLS Certificates for Client-Server Communications
Before, 4D included default SSL/TLS certificates for encrypted communications in the 4D Server package. Now, in 4D v20 R4, these default certificates have been removed. When the 4D Server opens an application with encrypted connections, it generates a temporary SSL/TLS certificate if no user-provided certificates are found in the Resources folder. This simplifies server deployment and enhances security by using a new certificate each time the server restarts.
Printing
Non-blocking Printing
4D v20 R4 introduces non-blocking printing, enabling simultaneous execution of multiple print jobs for enhanced application responsiveness. The default activation in new projects ensures a seamless experience, but older applications need to enable it in the compatibility options of the structure settings.
4D Netkit
Assign Labels & Get Multiple Emails with Gmail API
From 4D v20 R4, we are adding a duo of powerful enhancements to the Gmail command set.
Users can now retrieve multiple emails simultaneously and manage email labels more efficiently.
Label management involves assigning or removing custom or system labels like INBOX, SPAM, TRASH, UNREAD, STARRED, or IMPORTANT. Additionally, the update() function allows for label modifications.
For email retrieval, the getMails function enables the download of multiple emails simultaneously, limited to 100 emails per call.
Create, delete, and update Gmail labels
4D v20 R4 offers seamless Gmail label management with new functions in 4D NetKit, enabling developers to programmatically create (.createLabel()), retrieve (.getLabel()), update (.updateLabel() ), and delete (.deleteLabel()) labels, empowering customized email categorization and management.
Security
Enhanced Security Measures with ECDSA Support
4D ensures security through SSL/TLS for client-server communication and HTTP requests. While supporting RSA for over a decade, 4D v20 R4 introduces ECDSA support, widening your security options.
4D View Pro
New in 4D v20 R4
4D v20 R4 comes with a new version of SpreadJS, the v16.2, and a Ribbon update that is compatible with it. Below are the new features:
- Formula Editor Panel: for easy viewing, editing, and debugging of long and complex formulas.
- PivotTable Enhancements:
- SubTotal Option for Single Fields: to change the position for individual fields.
- Calculation Enhancements:
- Excel Manual Calculation Options: 4D View Pro now supports manual calculation. When set, formulas will not automatically calculate; instead, formulas will only calculate when edited or when a new formula is entered.
- Workbook Enhancements:
- Display Zero.
- Password-protected Worksheets.
- Cell defaultValue Property.
- Insert Cut Cells for Tables.
- Designer Enhancements:
- Excel Themes, Colors, and Fonts