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, ...
Suggested Answer

How to change text of FormBuildControl in x++?

(0) ShareShare
ReportReport
Posted on by 206

Hi experts,

I have a requirement of creating an inquiry form which shows no of items and no of warehouses against those items which are purchased. I need to add dynamicControl for warehouses because the no of warehouse changes with legal entities. I need to display how many items are being purchased from these warehouses. For example: Item: 001 is purchased from warehouse no: WH-01 3 times.  

So, I have added multiple dynamic formBuildStringControl. I now want to change the text of these dynamic controls on modify of a control but it's not working on front-end. Can you please suggest me anything? Your suggestions would be a great help to me. 

Thanks in advance.

Here is my code of modified on a control textbox:

pastedimage1683013832054v1.png


Here is my code of dynamically adding controls to a grid:
pastedimage1683013962653v2.png


Here is my form design:

pastedimage1683013996348v3.png


Here is my form init method where I am calling the addDynamicsControl method where controls are dynamically added.
pastedimage1683014099814v4.png


My addDynamicControls is working perfectly but controls.text is not reflecting in front-end. I did debug my code and I found out that the controls.text stores the text however, it is not reflecting in front-end. 

Please ask any further information you need.

I have the same question (0)
  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Arif, Are you getting buffer in controls (Line# 84).

  • ArifHussain Profile Picture
    10 on at

    Yes, I am getting the buffer.

  • Arif Hussain Profile Picture
    206 on at

    Hi Mohit Rampal ,

    I have debugged the code and as you can see in the below picture, the text is working fine in the backend and I am also getting the buffer.

    pastedimage1683023345028v1.png

  • Arif Hussain Profile Picture
    206 on at

    Hi sir (Mohit Rampal , goshoom ),

    Can you please help me.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    You'll be a better off if you create a report rather than a form. Both SSRS and Power BI have a matrix control for this purpose.

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Please check this old thread to go through challenges in creating form controls dynamically at runtime.

    community.dynamics.com/.../dynamically-add-fields-to-a-from-grid-control

    As Martin mentioned, reports will be best fit, if still you need form then you can explore usage of temporary tables in this case.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Have you checked this?

    community.dynamics.com/.../524007

  • Arif Hussain Profile Picture
    206 on at

    Yes Bharani Preetham Peraka ,

    I have gone through it, I am getting the buffer as well and the text is reflecting in backend using debugging but it is not reflecting in frontend.

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans