Change History for 9.2.3

Not yet releasedcontact Cognito support for Beta test access

General

  • New email composer allows formatted emails, saving and loading of email templates, and testing of mail merge. You can also use it for composing emails that will be sent to your Mail/Outlook app — not just for SMTP
  • Standalone mail merge function for mailshots with mail merge
  • Multibyte unicode characters sent to Windows Outlook no longer turn to mojibake
  • Sorting by fields containing @ signs (such as email address) now works properly. They were inadvertently being treated as wildcards for sorting
  • The title of list printouts is no longer stored, since it could apply the wrong file name when you switch documents; the filename is also no longer included by default
  • “Plain” invoices now remember the selected output mode
  • Various improvements to HiDPI support on Windows
  • Improved the reporting of SMTP authentication errors
  • Windows UI font updates to Segoe UI where available
  • Product margin display in the Selling Info tab is now consistently based on buy price
  • Reorder counted products takes the current count into consideration
  • Auxiliary document windows now show a changed indicator (•) on Windows

Server

  • Let’s Encrypt support for automatically obtaining and renewing SSL certificates. If you use SSL/TLS you will soon need to have automatic renewal because certificate lifetimes are going to shorten to 45 days. To use Let’s Encrypt with the ACME challenge, you need to be able to forward port 80 to the server.
  • Exporting and copying records is now much faster on high-latency networks
  • Certificate private keys are now preferentially stored in a separate .key pem file instead of the cert .pem file. If you will obtain certificate renewals by other means, this makes it easier to automate copying new certificates into the Datacentre configuration
  • The same certificate is now used by default for REST and native protocol network services; you do not need to specify them separately, although that is still available as an option
  • Fixed potential bad log data in IP address for HTTP/S logging
  • Changing a server’s timezone while users are logged in will no longer risk logging them out
  • Clean up temp files when user cancels a server-side report (on Windows Server 2016 and earlier, these could accumulate for years in C:\Windows\Temp)
  • Server alerts will no longer complain about offline backup volumes overnight
  • Recovery after a database crash is faster
  • Console displays the server’s primary IPv4 (enet preferred)
  • Installer creates Windows firewall rules to allow UDP multicast for mDNS because it seems to be blocked at a lot of Windows sites

Scripting

Note that the first couple of fixes here change some behaviours that could potentially break existing scripts if they rely on the undocumented and unintended behaviours that were fixed.

  • Nowdoc strings no longer interpret \ as an escape character (this will be a breaking change if you have scripts where you have double-escaped newlines as \\n to make them work in, e.g. javascript) [potential breaking change]
  • WebViewControl no longer changes unspecified options (in particular, using it to set the browser technology option useWKWebview or useWebView2IfAvailable for one platform would have the side effect of setting the option for the other platform to false)
  • External packages – a standalone script window can be saved as a binary or directory package (as well as XML deployment), The package can be codesigned and later be loaded using LoadScriptFile
  • LoadScriptFile(packagePath, publicKeyArray, domain) returns false if package fails to load, see log for reason. The function now also expands paths beginning with “CACHE/” or “TMP/”
  • Script editor window dirty indicator on Windows
  • PutClipboardText flakiness on Windows; now properly supports unicode text; it ill also put text as HTML if it looks like HTML
  • SetFieldValue(win, ident, value, [flags]) 1 = append; 2 = preserve window modified state
  • Unzip(src, dst) function
  • Debugger context help now works for looking up highlighted function/handler in the manual as for the script editor
  • Public handlers can be called from custom column expressions (they will be optimised first with an assumption that the result will not vary across records in the list, so every row will see the same result — useful for accessing a global setting)
  • ContactRoles global variable — semicolon-delimited list of role names
  • GetRoleForRoleName function maps a role name to a role number
  • Fixed potential window modality failure closing a scripted modal window
  • When activating a script from the Script Editor, the script editor will now call a LoadFromScriptEditor handler that you can use for testing a script rather than putting test code into the main Load handler
  • Select All in the Windows script editor (and scintilla generally) now actually selects all rather than falling short when the text contains multibyte characters
  • Updated to the latest Scintilla + Lexilla libraries. If you store html+javascript as a named script for use with GetScriptText, it will now be syntax-coloured
  • ModalListWindow and CreateListWindow now support hosting a WebView2 in the same window
  • ModalListWindow and CreateListWindow now check that a document is open
  • SetFieldValue on a tab control can now be used to replace the tab definition if the given value contains semicolons
  • Script Editor no longer clears breakpoints when you select another script. Breakpoints remain as long as the editor window is open
  • The debugger will no longer allow you to unload a script from a breakpoint inside a callback handler that was called from a library, since that would dispose the library’s object from under it
  • Curl_Exec should now provide better results from GetLastErrorMessage when errors occur
  • Libcurl’s CURLOPT_DEBUGFUNCTION may now be used
  • Navigator("prvw:path/to/file.xml") will open a preview xml file created via DoReport or DoForm with output format xml
  • Script Editor context menu copy selection as styled HTML or RTF preserving syntax colouring for documentation purposes
  • InsertVars() can now see fields from a table loop control variable (using either the variable name or the table name as a prefix)
  • ProgressStopped() function enables regular users to stop a long running operation in a script
  • It is now possible to make a very narrow popup menu that will open as a full size combo box on Windows (it will temporarily resize itself when opened)
  • Ask() now accepts a “width” parameter to set the window width in points for when you need a wider entry field
  • Record-specific functions that were previously only available for loop control variables in the report writer may now be used with table loop control variables in MWScript: prod.StocktakeNewQtyForLocation, prod.StocktakeStartQtyForLocation, prod.SOHForLocation, prod.SellPriceForPriceCode. prod.AvailableStockForBatch, name.GetContactForRole, ldgr.GetMovement, and ldgr.GetBalance
  • REST xml-terse export is now slightly less terse (it includes the LastModifiedTime field). This field will be ignored if importing the same XML
  • Custom window text field mnemonics <BORD> to apply a border to an <SBA2> type field; <LOCK> to make a field read-only without appearing disabled on Windows
  • GetReplyTo function to get the reply-to address for the current user (if an override has been specified)
  • Fixed ugly Webview2 borders in custom windows
  • Fixed multipart alt + mixed MIME formatting in the internal SMTP function
  • Fixed some potential script editor crashes
  • Fixed crash with very large data export via Applescript
  • Inappropriately calling WriteCurrentRecordForWindow will no longer bring down the server
  • Sort(tabulartext) no longer strips commas from the text
  • Curl_AsyncExec(curl, completionHandler) to run a curl request in a background thread and call a completion handler when it finishes
  • Curl_GetOpt(curl, opt) for retrieving handles from the curl handle
  • CallHandler(handlerName, ...) for patching callbacks
  • ConfirmClose(winRef) handler for custom windows; return false to cancel closing
  • PATH_SEP constant ("/" on Mac, "\" on Windows)
  • convertpkg src="some.mwpkg" dst="some.mwpkgd" CLI command for converting binary packages (useful for checking into version control)
  • LoadPicture no_pic option now works when a picture has already been loaded
  • Export() function, plus CLI, Applescript, COM, and REST export now support "json" as an output format. Dates and times are formatted as ISO8601
  • JSON_GetArray(jsonRef, id, ...) similar to JSON_Get but returns a JSON sub-object as an associative array
  • JSON_AsArray(jsontext) parses the JSON to an associative array
Posted in Change History | Comments Off on Change History for 9.2.3