Skip to main content
Dynamics 365 general forum
Suggested answer

TypeError: Cannot read property 'controls' of undefined

editSubscribe (0) ShareShare
ReportReport
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.

pastedimage1612963574814v1.png

pastedimage1612964436498v4.png



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


pastedimage1612963911777v3.png


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

pastedimage1612963852678v2.png



pastedimage1612966312592v1.png

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

    Hi,

    Sorry to hear about this issue during your transition.
    Can you open a support request on https://admin.powerplatform.microsoft.com/support to get help on troubleshooting that issue?

    Henry

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…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans