Most of best practice (BP) checks are quite good in D365FO, helping to make your solution better. However, BP rules are created by different Microsoft teams which sometimes leads to conflicting requirements.
If you create a View called "OurView" using table with financial dimensions and compile the project from Visual Studio, the following BP error will appear:
Error BP Rule: [ViewDimensionEnabledTypeMissingValueIndex]:Path: [dynamics://View/OurView]:Dimension enabled type views must have an index on the Value field that is enabled, has AllowDuplicates set to No, and where Value is the first field in the index.
The obvious fix is to create an Index as requested. When you compile your project, new warning will appear, asking you to delete the newly created Index:
ViewWithIndexes: Path: [AxView/OurView]:You have added an index to a view, but AX7 views do not support indexing: No index will be added to the view in SQL server. We suggest removing the index.
After some testing we discovered that Index is actually required here. There will be issues with data import/export for such View, if there is no index defined.
It is possible to suppress the ViewWithIndexes BP warning by using the following code:
<Diagnostic> <DiagnosticType>Metadata</DiagnosticType> <Severity>Warning</Severity> <Path>AxView/OurView</Path> <Moniker>ViewWithIndexes</Moniker> <ElementType>AxView</ElementType> <Justification>Index is required</Justification> </Diagnostic>
No comments:
Post a Comment