web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Remove validation on table method using extensions

(0) ShareShare
ReportReport
Posted on by 70

In system method validateField there is a validation that I want to remove. 
Any suggestions?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    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.

  • Marija Todorovic Profile Picture
    70 on at

    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.

  • Mea_ Profile Picture
    60,286 on at

    Did you try to call "cancel" ?

  • Douglas Noel Profile Picture
    3,905 on at

    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

  • Marija Todorovic Profile Picture
    70 on at

    When I call cancel it throws an error.

  • Mea_ Profile Picture
    60,286 on at

    It would be helpful if you provide more details, like error message or code you are trying to use.

  • Marija Todorovic Profile Picture
    70 on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans