Microsoft Dynamics 365 Blog


If you have e.g.  a form grid control name which is longer than 40 characters, the MorphX Best Practice check

fails with error like:

“Unknown data source <ControlName>”


The reason that the problem occurs is that the Best Practice check class that is generating this error

(SysBpCheckFormEditControl) uses variable of type “IdentifierName” to hold the name of the

datasource used on the control. The IdentifierName EDT is a 40 characters string but the datasource name

is several characters longer than this. Consequently, the datasource name from the control is truncated

so it does not match when compared against the actual datasource available on the form

(which are not being held in “IdentifieName” variable).


If you change the type of datasource from identifierName to unbounded str in

SysBPCheckFormEditControl.checkReference() method, this issue can be resolved.


Another option is adding the Best Practice error into AOT/Macros/SysBPCheckIgnore, the issue will be
resolved. E.g. add this line:

<violation errorcode=”#BPError”



This is because that the errors are in the ignoreMap which is defined in SysBPCheck class. And the ignoreMap is

initialized according to the AOT/Macros/SysBPCheckIgnore Macro.

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!