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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Abnormal termination with unhandled exception. System.ArgumentOutOfRangeException: Index was out of range.

(0) ShareShare
ReportReport
Posted on by 5

pastedimage1581934862498v2.png 

Hello!

After adding handler to the button of form got this error. After deleting of handler the error didn't disappear.

Build of model runs without errors. Project build - with errors. 

Deleting of class did not help.

Code: 

[FormControlEventHandler(formControlStr(HcmWorker, ActionPane_BankAccounts), FormControlEventType::Clicked)]
public static void ActionPane_BankAccounts_OnClicked(FormControl sender, FormControlEventArgs e)
{
HcmWorker hcmWorker = sender.formRun().dataSource("HcmWorker").cursor();

info(hcmWorker.RecId);
}

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ksenia,

    Have you already tried VS/IIS restart?

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Ksenia,

    Can you let us know what AX version you operate?

    Many thanks,

    Ludwig

  • Ksenia Profile Picture
    5 on at

    Yes, of course

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans