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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Read values from Dynamic form controls in D365FO

(1) ShareShare
ReportReport
Posted on by 468
Hello,
I need to read the value from a dynamically added form control on button click event. 
Specifically, I need to read values of the custGroup field on create new customer form on clicked event of the Save button. The regular code will not work here because the control names are not identified
 
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,
     
    In the event handler code of clicked button, you can't directly get the value of control. You should call it as in the following code:
    FormRun formRun = sender.formRun();
    FormStringControl custGroup= formRun.design().controlName(formControlStr(FormName, ControlName)) as
    ​​​​​​​ FormStringControl; info(custGroup.valuestr());
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
     
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • André Arnaud de Calavon Profile Picture
    303,691 Super User 2026 Season 1 on at
    Hi Srikanth,

    The control you marked is bound to a DataSource field. You can get the value from the DirPartyEntity (CustTable) datasource, field CustGroup. When initializing the form, the datasource table is replaced with CustTable and the fields displayed are coming from field groups.
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 659

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 465 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 304 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans