Posts

Showing posts from December, 2022

Downloading Files from FTP and Doing Something With Them In D365FO

  Although D365FO is now thoroughly modern and web based, with all the good things that entails, we still have to interface with some less modern systems. Sometimes those systems are literally older than we are. There are some middleware solutions that can help bridge the gap but we have quite a few tools in D365FO that can help us. Let's talk about FTP for a bit. The tried and true battle horse of Odin himself, this is never going to go away, ever. So, let's see what we can do from inside D365FO with no C# in play; just some standard tools available from x++. Consider the very simple example: using System.Net; class AAX_FTPDownloadSimple {     public static void main(Args args)     {         System.Net.WebClient webClient = new System.Net.WebClient();         webClient.Credentials = new NetworkCredential("userName", "password");         webClient.DownloadFile(" ftp://nadummy.sharefileftp.com/test/test....

D365 – Data Entity Method Call Sequence

Image
  1. initValue 2. validateField 3. validateWrite 4. update 4.1. doUpdate 4.1.1. persistEntity 4.1.1.1. doPersistEntity 4.1.1.1.1. initializeDataSources 4.1.1.1.1.1. initializeEntityDataSource Note: initializeDataSource is called once for each DataSource in Entity. 4.1.1.1.2. mapEntityToDataSources Note: initializeDataSource is called once for each DataSource in Entity. 4.1.1.1.3. saveDataSources 4.1.1.1.3.1. updateEntityDataSource 4.1.1.1.4. mapEntityToDataSource (maybe for another record) 4.1.1.1.5. saveDataSources 4.1.1.1.5.1. updateEntityDataSource for update operation and (insertEntityDataSource for insert) 4.1.1.1.5.1.1. mapDataSourceToEntity 4.1.1.1.5.1.2. doSaveDataSource 4.1.1.1.5.1.2.1. updateDataSource 4.1.1.1.5.1.2.1.1. preupInsertDataSource 4.1.1.1.5.1.2.1.1.1. validateWrite of table Plus: postLoad This method is called during the export for setting the value to unmapped fields after entity is downloaded to datasource. EXPORT:        Entity- postLoad...