Refactoring Areas
File management​
- OpenFileDialog, SaveFileDialog refactored to use BlobImport, BlobExport functions
- DownloadToFile to normalize file names (removing the path)
- CreateClientFile, ClientTempFileName replaced by ServerTempFileName
- File.Create to store files on the server and download when GUI is allowed
- Other File Management cases to be refactored are logged with comments
Temp Blob​
- TempBlob records are substituted by the new Temp Blob codeunit
- Related functions are refactored as well
- Including assignment, ReadAsText, WriteAsText, etc.
Breaking Changes​
These functions are refactored:
- GetLanguageID
- GetUserLanguage
- ApplicationLanguage
- LookupApplicationLanguage
- LanguageManagement
- TextManagement
- GetLanguageCodeFromLanguageID
- LookupWindowsLocale
- GetWindowsLanguageNameFromLanguageID
- AutoFormatTranslate
- AutoformatManagement
- TryGetCultureName
- CaptionManagement
- ConvertValueFromBase64
- ConvertValueToBase64
Triggers​
Where new code is inserted into the triggers it gets refactored from a comment to trigger. Table and Page triggers are included.
//trigger Onlnsert()
//>>>>> ORIGINAL CODE:
// begin
/*
JobsSetup. Get;
#2..31
*/
//end ;
//>>>>> MODIFIED CODE:
// begin
/*
JobsSetup.Get;
Message('Hello new job!');
#2..31
*/
//end;
The above code will be converted to below:
trigger OnInsert()
begin
Message('Hello new job!');
end;
Events​
- Events are extracted from objects.
- All events are moved to new event subscription codeunits.
- Codeunit events are extracted from deltas.
- Where possible, closest events are discovered and code is transferred to the base-app events
Options​
- Options from table fields and variables are extracted
- Enums are generated
- Options get replaced by the new enums