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

Community site session details

Session Id :

Validate Event form control Extensions- Dynamics 365 for finance and Operations

Ali Zaidi Profile Picture Ali Zaidi 4,655

Very handy and quick tip. How to validate and cancel / failed validation logic in Dynamics 365 for finance and operations.. Here is
FormControlCancelEventArgs is key to return false in the case of validation fail.Very similar logic works for form data source field validate events.

[FormControlEventHandler(formControlStr(BabayeeDaForm,  _BabayeDaTextBox), FormControlEventType::Validating)]
    public static void BabayeeDaForm_BabayeDaTextBox_OnValidating(FormControl sender, FormControlEventArgs e)
    {
var args = e as FormControlCancelEventArgs;
ret = checkFailed(' Main nahee mananah.');
            args.cancel(ret );
}

Comments

*This post is locked for comments