Monday, December 11, 2023

Get warehouse contact information based on purpose in D365 F&O

 

 public container getWarehouseReleaseEmailAddress(InventLocationId _inventLocationId)

    {

     

        InventLocationLogisticsLocation inventLocationLogisticsLocation;

        InventSiteLogisticsLocation     inventSiteLogisticsLocation;

        LogisticsElectronicAddress      logisticsElectronicAddress;

        LogisticsLocation               logisticsLocation;

        InventLocation                  inventLocation;

        LogisticsElectronicAddressRole  elecAddressRole;

        LogisticsLocationRole           locRole;

        container                       conEmail;


        conEMail = conNull();



        // Get warehouse from communication details

        while select inventlocation

        join inventLocationLogisticsLocation

            where inventLocationLogisticsLocation.InventLocation == inventlocation.RecId

            && inventlocation.InventLocationId == _inventLocationId

        join logisticsLocation

            where logisticsLocation.ParentLocation == inventLocationLogisticsLocation.Location

        join firstOnly logisticsElectronicAddress

            where logisticsElectronicAddress.Location == logisticsLocation.RecId

            && logisticsElectronicAddress.Type == LogisticsElectronicAddressMethodType::Email

            join elecAddressRole

                where elecAddressRole.ElectronicAddress == logisticsElectronicAddress.RecId

            join locRole

                where locRole.RecId == elecAddressRole.LocationRole

                && locRole.Type == LogisticsLocationRoleType::None

                && locRole.Name == 'Warehouse Release'

        {

            if (!conFind(conEMail, logisticsElectronicAddress.Locator))

            {

                conEMail += logisticsElectronicAddress.Locator;

            }

           

        }

 


        return conEMail;

      

Friday, December 1, 2023

Strategies to Enhance Performance of Cloud-Hosted Virtual Machines in Dynamics 365 Finance and Operations.

 In my experience the largest boost in X++ dev performance comes from adding the right exlusions to Microsoft Defender or (Other AV software)'

Here is my PowerShell coemmand to setup AV - adjust and use at OWN RISK. 

Add-MpPreference -ExclusionExtension @('*.md', '*.man', '*.xml', '*.xpp', '*.netmodule') -ExclusionPath @('E:\Git', 'C:\AOSService', 'C:\Logs') -ExclusionProcess @('AosDeploy.exe', 'testhost.exe', 'xppfagen.exe', 'sqlservr.exe', 'axsetup.exe', 'robocopy.exe', 'xppcagent.exe', 'git.exe', 'xppc.dll', 'xppcAgent.17.0.exe', 'labelc.exe', 'xppc.exe', 'devenv.exe', 'xppbp.exe', 'vstestconsole.exe', 'batch.exe', 'qtagent32.exe', 'qtagent32_40.exe', 'w3wp.exe', 'iisexpress.exe')


#D365FO, #Development, #X++