Open pri-kise opened 1 year ago
I checked the documenation again and found some note, that only alphanumeric characters are allowed for the ApplicationArea property. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-applicationarea-property#property-values
Therefore anything else should be removed from the field name: https://github.com/StefanMaron/MSDyn365BC.Code.History/blob/ea65f641b8cd8455536977e9218cc6f56c09cabd/BaseApp/Source/Base%20Application/ApplicationAreaCache.Codeunit.al#L99
Hi @pri-kise,
we're trying to get our backlog under control, and this issue didn't make the cut. Do you consider this an important fix? In that case, I could fight for this bug to remain opened. It's 2 years old and it's not something we've heard about except in this issue. What do you think?
Hi @JesperSchulz, I've reported this because this can lead to a RunTime Bug that makes the Client unusable. Because you'll receive a web client Bug and the client crashes.
Since this does not seem to be on the priority list to prevent RunTime Crashes, I now have created the following idea.
https://experience.dynamics.com/ideas/idea/?ideaid=162ca15c-c702-ef11-a73c-6045bdb93e93
Maybe I'll have some spare time to get this fixed in the BaseApp Pilot.
In my opinion this is an importaned fix. Alterantively the Plattfrom Team could improve their ApplicationArea handling and support more Characters.
Runtime crashes should be on the short-list (at least if it's a likely scenario). I'll try to repro. Depending on my findings, I will reactivate the bug. I guess it shouldn't be an idea - that just doesn't seem right 😉
@JesperSchulz here is a small repro: https://github.com/pri-kise/msdyn365bc-application-area-test
Could not open the company.
While opening company 'CRONUS AG', the following error occured: ''#Basic,#Suite,#RelationshipMgmt,#Jobs,#FixedAssets,#Location,#BasicHR,#Assembly,#ItemCharges,#Warehouse,#Service,#Manufacturing,#Planning,#Dimensions,#ItemTracking,#Intercompany,#SalesReturnOrder,#PurchReturnOrder,#Prepayments,#CostAccounting,#SalesBudget,#PurchaseBudget,#ItemBudget,#SalesAnalysis,#PurchaseAnalysis,#InventoryAnalysis,#Reservation,#OrderPromising,#ADCS,#Comments,#RecordLinks,#Notes,#VAT,#ItemReferences,#BasicEU,#BasicDE,#PTE-XXXFeatureA' is not a valid value for the APPLICATIONAREA function parameter.
The value must be a text string that contains one or more application area tags.
A tag must start with # and can be followed by any combination of letters (Aa-Zz) and numbers (0-9).
Use a comma to separate multiple tags. Example: #Basic,#Suite'
AL stack trace:
"Application Area Mgmt."(CodeUnit 9178).SetupApplicationArea line 2 - Base Application by Microsoft
"Application Area Mgmt. Facade"(CodeUnit 9179).SetupApplicationArea line 4 - Base Application by Microsoft
LogInManagement(CodeUnit 40).LogInStart line 43 - Base Application by Microsoft
LogInManagement(CodeUnit 40).CompanyOpen line 10 - Base Application by Microsoft
LogInManagement(CodeUnit 40).OnCompanyOpen line 2 - Base Application by Microsoft
"System Initialization"(CodeUnit 150).OnAfterInitialization(Event) line 2 - System Application by Microsoft
"System Initialization Impl."(CodeUnit 151).Init line 18 - System Application by Microsoft
"Company Triggers"(CodeUnit 2000000003).OnCompanyOpen(Event) line 2
The procedure
GetApplicationAreas
incodeunit 9177 "Application Area Cache"
does only remove spaces from the fieldref name. We have used - in our comined prefix, which leads to errors when the plattform procedureApplicationArea
is called.Maybe all other special characters should be removed too. And you should maybe improve the documentaiton, too. https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extending-application-areas#adding-an-application-area
Internal Work Item: AB#445142