Wednesday, 12 February 2020

Suppress BP Warnings

When using the Microsoft Dynamics AX development environment, you should adhere to a set of best practices. The X++ compiler checks the code for best practice issues. These issues can result in best practice errors, warnings, or informational messages. There are some warnings which we need to suppress or hide from the BP errors Check List. In order to do this we will have to follow these steps.
For Example: You need to suppress a warning like mentioned below.

BP RULE: [BPPARAMETERNOTUSED]:THE PARAMETER ‘E’ IS NOT USED.

  1. Get the name of warning, in my case the above green highlighted characters are my warning name.
  2. Get Ready the reason for suppress. The below red highlighted characters are the reason. You can change the reason according to your own situation.
  3. [SuppressBPWarning(“BPParameterNotUsed“, “Parameter required by the event interface“)]
  4. Use the above header (point no 3) before any method of class as you can see in below attached picture.
    Capture5a.PNG

No comments:

Post a Comment