Dear AX/D365FO Team,
Today we are going to learn how to ignore known errors in D365FO.
Recently I came to this situation where I have no choice rather than ignore the error and continue the build. So lets start and understand the situation when we need to ignore the errors.
Requirement : Show lookup in excel add-in for custom dimensions.
Solution :Add related field fix relation with string value (dimensions name).Normally this is not allowed in D365FO but we can achieve this through ignore error functionality.
Development :
As you can see in below screen CD1 is my string value in related field fix relation, x++ is not allowing you to create related field fix relation on the basis of string values. To achieve this I have used ignore error functionality.
Steps to ignore Error-
1) After making such changes start building of your model.
once you complete your model build you will get one error file generated in below path
2) Next you need to rename it as CompileError.xml
and change first Tag name of xml file from <Diagnostics></ Diagnostics
> to <IgnoreDiagnostics> </IgnoreDiagnostics>
And keep this file in below location – and do the
build.
3) Build the model again and check the result.
Error file format
<Diagnostic>
<DiagnosticType>Metadata</DiagnosticType>
<Severity>Error</Severity>
<Path>AxDataEntityViewExtension/DimensionCombinationEntity.MT/Relations/CD1/Constraints/RelationConstraintRelatedFixed1/RelatedField</Path>
<Moniker>FieldTypeIsEnumOrInt</Moniker>
<Message>Field type must be enum, int, or int64.</Message>
</Diagnostic>
<Diagnostic>
<DiagnosticType>Metadata</DiagnosticType>
<Severity>Error</Severity>
<Path>AxDataEntityViewExtension/DimensionCombinationEntity.MT/Relations/CD1/Constraints/RelationConstraintRelatedFixed1/Value</Path>
<Moniker>RelationConstraintValueStrMalformed</Moniker>
<Message>The value must be an integer or the enum value in the format: <enumname>::<enumvaluename>.</Message>
</Diagnostic>