Skip to main content
Dynamics 365 general forum
Suggested answer

TypeError: Cannot read property 'controls' of undefined

editSubscribe (0) ShareShare
Posted on by 95

Hello everyone, 

I'm getting the following error in the Quote Line Detail form while trying to change the values of Quantity and Unit Price field. The form was perfectly working before our system shifted to Unified Interface recently.



I found that the following onChange function in the QuoteLineDetailInitialization.js is being called on change of Quantity and Unit Price field values.


The above lines of code then call the following functions in UIUtils.js 



The formFieldHasValue function gets field name in the formContext parameter instead of formContext object and 0(null) in the field parameter, that's why in the next line it can't retrieve data and gives the error. The same thing happens in disableAttribute function as it doesn't get formContext object in the first parameter. Both the files are system defined scripts so we are unable to make any changes there. I checked execution context as first parameter option from every function call in the form properties but the error persists. Can anybody help me with this ?

Thanks in advance.

  • Suggested answer
    Henry J. Profile Picture
    Henry J. 5,235 on at
    RE: TypeError: Cannot read property 'controls' of undefined


    Sorry to hear about this issue during your transition.
    Can you open a support request on to get help on troubleshooting that issue?


Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans