Thursday, June 12, 2025

D365 F&O Tier 1 Update Failure Step 25 AOSService

When upgrading a tier 1 environment you could receive the following error:

GlobalUpdate script for service model: AOSService on machine

This usually means an issue with the DB sync, however, the log zip file doesn't always contain a file indicating the error.  Here are some steps to fix this issue:

  1. Ensure VS 2022 is fully upgraded.
    1. If you had to upgrade VS 2022, uninstall D365 F&O extension
    2. Re-install extension from K:\DeployablePackages\                                    [ID]\DevToolsService\Scripts\Microsoft.Dynamics.Framework.Tools.Installer.17.0
  2. Full compile of ALL modules
  3. DB Sync
  4. Restart environment
  5. 'Resume' upgrade



Wednesday, June 11, 2025

D365 F&O Service Update failure DevToolsService

Recently when upgrading tier 1, cloud hosted, environments from 10.0.41 to 10.0.42,43, or 44 I received the following error:
 
Update script for service model: DevToolsService on machine

On some of my environments I would receive an error indicating it couldn't find VS 2022 and others that had VS 2022 it was another error.  
In order to get past this I would do the following:

  1. If missing VS 2022, install it.
    1. If it is already installed, update it.
    2. Remove the D365 F&O extension if it is installed.
  2. Install D365 F&O extension from K:\DeployablePackages\[ID]\DevToolsService\Scripts\Microsoft.Dynamics.Framework.Tools.Installer.17.0
  3. In the same 'Scripts' folder, run the powershell command '.\AutoUpdateDevToolsService.ps1'
  4. If that is successfull, copy and make a duplicate of that command.
  5. Delete all code in the original .ps1 file and then resume your service update.


Wednesday, May 21, 2025

Vendor record creation DirPartyTable lookup / creation by name.

 We have a custom vendor creation form but needed it to behave similarly to the standard VendTable form when creating a new vendor and selecting or creating a party.  In order to do this you need to join 'DirPartyTable' to your master record table as datasources in the form, add the 'DirPartyTable' name field as a control and then add the following code.

At the form level, add this variable:



On 'init' of the form, initialize the variable and setup the parms:




On 'createRecord' of the form:





I comment out super as my form is for creation only.

And finally, you will need this parm method in order for the selected 'DirPartyTable' record to come back to your datasource:





That's it!  You can now use the full functionality of looking up 'DirPartyTable' records by name.

Wednesday, March 12, 2025

D365 F&O Email distributor batch add CC

 Well, it has been a while since my last post... So here go...

I recently had the requirement to have CC ability with our emails that I am created via code. We, however, use the SysOutgoingEmailTable and Email templates to send our emails.  The SysOutgoingEmail has no CC field.

Here is my solution.

Create a new extension and add a new field (I created an EDT that extends SysEmailRecipients) to the SysOutgoingEmailTable.

Create extension of SysEmailDistributor class and create chain of command call on initializeMessageBuilder method.


In this chain of command, use the messageBuilder object to 'addCc'.  I also break my field up by ';' because I will have, potentially, multiple email addresses.

Lastly, you need to create your own class and batch job to run for this:


I'm not sure why, but the chain of command isn't enough as the standard SysEmailDistributor won't pick it up. Once you create your own class and a batch jobs, you are all set.
You then simply need to populate your custom field with the CC addresses when creating your email in your code.

That's it!