Dynamics 365 Blog - Page 3

These posts are machine-translated.

Suppress Best-Practice Deviations

In principle, every solution in Dynamics 365 for Finance and Operations should be free of best-practice deviations, but sometimes there is the need to suppress them.

Such a case are for example, event handlers that have a predefined parameter profile, but if one of these parameters is not used, it causes a BP deviation.

class MyFreeTextInvoiceHeaderFooterTmpEH
{
    [DataEventHandler(tableStr(FreeTextInvoiceHeaderFooterTmp), DataEventType::Inserting)]
    public static void FreeTextInvoiceHeaderFooterTmp_onInserting(Common sender, DataEventArgs e)
    {
        FreeTextInvoiceHeaderFooterTmp freeTextInvoiceHeaderFooterTmp;
    
        freeTextInvoiceHeaderFooterTmp = sender;
    
        if (freeTextInvoiceHeaderFooterTmp.CompanyBankAccount == "")
        {
            freeTextInvoiceHeaderFooterTmp.CompanyBankName = "Unknown";
        }
    }
}

With the above EH, the following BP deviation would be output because the parameter e is not used:

BP Rule: [BPParameterNotUsed]:The parameter 'e' is not used.


 
 

Exception during Platform update 30

When I recently wanted to update a local D365-VPC with Platform Update 30, the following error occurred at Step 19:

GlobalUpdate script for service model: AOSService on machine: D365Local
Sync AX database
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: System.Management.Automation.RuntimeException: An exception of type System.Net.WebException occurred when making an http request to: http://127.0.0.1/ReportServer. Refer to the log file for more details.
The step failed

The reason for this error was quickly found - after downloading the VHD from LCS, the name of the virtual computer was changed, but not all neccessary steps were done. As a result, SQL Reporting Services had a problem, a new database had to be entered here. How this works, and what else you have to consider when renaming a VHD, can be found here.


 
 

Error "The step failed" during platform update 30 in connection with reporting services

If the following error occurs during a platform update of a local VPC...

Executing step: 19
GlobalUpdate script for service model: AOSService on machine: D365FOSHLocal
Sync AX database
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: System.Management.Automation.RuntimeException: An exception of type System.Net.WebException occurred when making an http request to: http://127.0.0.1/ReportServer. Refer to the log file for more details.
The step failed
The step: 19 is in failed state, you can use rerunstep command to debug the step explicitly
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.ExecuteRunbookStepList(RunbookData runbookData, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Parameters parameters)
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.AXUpdateInstallerBase.execute(String runbookID, Boolean silent, String updatePackageFilePath, IRunbookExecutor runbookExecutor, Boolean versionCheck, Parameters param)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args)

...may be the reason that the computer name of the VHD has been changed, but not all steps recommended by Microsoft have been performed.

What they are can be found here: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/migration-upgrade/vso-machine-renaming

 

 


 
 

Display financial dimension as display method

[SysClientCacheDataMethodAttribute(true)]
public display DimensionDisplayValue displayLedgerDimensionValue()
{
    return LedgerDimensionFacade::getDisplayValueForLedgerDimension(this.LedgerDimension);
}

 
 

Error "Argument to method getFieldValue out of range" during import using a data entity

When importing data via a self-created data entity that also contains financial dimensions for a self-created table, I recently had the problem that the import always failed with the following error:

Argument to method getFieldValue out of range

During debugging it turned out that a field name could not be determined in the method DimensionDynamicAccountDataEntityResolver.getEnumValue(). However, the responsible method DictDataEntityField.dynamicDimensionEnumartionField() is not visible.


 
 

Add a field of type LedgerDimension to a (new) table.

In Dynamics 365 for Finance and Operations, only a few steps are required to add a field of type LedgerDimension - that is, a field that is to include financial dimensions - to a (new) table:

  1. Create a New Foreign-Key Relationship to the DimensionAttributeValueCombination Table
  2. Select RecId as the index of this relation.
    A new field is now generated in the table and the relation to this field is created.
  3. he Extends property of this new field should now be changed to DimensionDynamicAccount
    The field can now be renamed, for example, LedgerDimension.
  4. Now another new field must be inserted that derives LedgerJournalACType from BaseEnum.

The following steps are necessary to display such a field in a (separate) form:

  1. Place both created fields in the design using Drag & Drop
  2. A Segmented Entry Control is created for the field that is to contain the dimension (for example, LedgerDimension).
  3. The following properties must now be adjusted in the properties of this control
    • Controller Class: DimensionDynamicAccountController
    • Account type field: The field extended from LedgerJournalACType must be entered here.

Depending on the class that is stored in the Controller Class property of the Segmented Entry Control, further settings may have to be made, although not all of them are always permitted. For more information see https://docs.microsoft.com/de-at/dynamics365/unified-operations/dev-itpro/financial/segmented-entry-control-metadata-specification


 
 

Error during platform update 30 in connection with Management reporter

If the following error occurs during a platform update of a local VPC...

Executing step: 42
GlobalUpdate script for service model: MROneBox on machine: localhost
Update the financial reporting database
Job AutoGlobalUpdateMR job failed
The step failed
The step: 42 is in failed state, you can use rerunstep command to debug the step explicitly
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.ExecuteRunbookStepList(RunbookData runbookData, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Parameters parameters)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args)

...may be the reason that the computer name of the VHD has been changed, but not all steps recommended by Microsoft have been performed.

What they are can be found here: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/migration-upgrade/vso-machine-renaming

 

 


 
 
Pages « 1 2 3 4 5 » 

 

 
 
 
Posts of the actual month
April 2024
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728
2930 
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.