Announcements
No record found.
In system method validateField there is a validation that I want to remove. Any suggestions?
*This post is locked for comments
Hi Marija Todorovic,
You can subscribe to Validating event on form data source field and cancel super(). To find example just do cross references for FormDataFieldCancelEventArgs class in AOT and see it's usage.
Thank you for the reply, but I cannot see how to skip validation using FormDataFieldCancelEventArgs.
As per my understanding with this class I could just stop the execution - throw an error.
Did you try to call "cancel" ?
Hi
Take a look at
community.dynamics.com/.../customizing-d365-with-event-handlers
EventHandler onValidatingField set parmResult to true in that case
You have the fieldname in the eventargs too.
Maybe you can try to set true in that case?
Sorry can't check.
regards Douglas
When I call cancel it throws an error.
It would be helpful if you provide more details, like error message or code you are trying to use.
I managed to achieve this with overriding validation on the form control.
[FormDataSourceEventHandler(formDataSourceStr(ProjTable, ProjTable), FormDataSourceEventType::Initialized)]
public static void ProjTable_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
{
sender.object(fieldNum(ProjTable,WorkerResponsibleFinancial)).registerOverrideMethod(methodStr(FormDataObject, validate),methodStr(ProjTable_AdSv_Extension,validateWorkerResponsibleFinancial));
}
public boolean validateWorkerResponsibleFinancial(FormDataObject _targetField)
return true;
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Alexey Lekanov 2
Henrik Nordlöf 2 User Group Leader