Friday, 11 October 2019

BP Error 'parameter not used' fix

BP Error 'parameter not used' fix

Many times you come across the error after compiling.
The best solution is to remove the parameter in case it is not required because if it is not used then why declare it.
However in many cases while extension you need the paramtere and hence if you want to supress this error then you can use the following code ..place it above the method within the attiributes and you wont get the error.

SuppressBPWarning('BPParameterNotUsed', "Parameter required" 
[FormDataFieldEventHandler(formDataFieldStr(SalesForm, Datasource, Field), FormDataFieldEventType::Validating),SuppressBPWarning('BPParameterNotUsed', "Parameter required")
]
{
///code here
}

Thanks,
Vikas Mehta.

No comments:

Post a Comment

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...