Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

PCF Control giving error when its added in Form on Dynamics 365 Platform



I have developed custom PCF Control in Typescript . I have used some React JS code to open React-Modal as popup window in Control Button Click.

This custom PCF Control is running fine when i am running it locally i.e from Visual Studio code. But when i deployed PCF Control to my Dynamics 365 environment.

And tried to access control in CRM Form then getting below error show in screenshot.




Basically i have used React js inside my Typescript project. I have used React-Modal component for showing popup window .

i did some analysis and found that when i remove Modal tsx file from my PCF Control and deployed simple component on Dynamics 365 platform then this error is not coming .


Can anyone tell me what i am doing wrong while calling Modal component or in its contructor.

So below is my piece of code i wrote it down to call my Modal component. Basically passing one parameter to Modal Component.

<MyModal inputABN = {this.state.inputValue}/>


And below is constructor of My Modal component.

export class MyModal extends React.Component<ModalProps, any> {
constructor (props: ModalProps) {
this.state = {
showModal: false , inputABN: props.inputABN


Any help will be appreciated .




Hi Scott,


Thanks for your comment.


Ya i will try to set it to id of div in PCF component.



New Member

I am getting exact same error for my PCF control. I do not use React but I am calling Google API address autocomplete in the control. The control works most of the time with no issues in CRM. The error is thrown when I navigate from account where the control lives to a related case and then on the case I click on "Customer" lookup field to navigate back to the account. This is the only time I get "Error loading control" on the account form. Clicking on that link gives me error below. Once again, the control works if I navigate to accounts directly.

Error occured during initialization of control: rsm_RSM.AddressAutocomplete;Message: Could not find/invoke RSM.AddressAutocomplete's constructor

Here is more details I get from the debugger:

Error: Could not find/invoke RSM.AddressAutocomplete's constructor at t._createControlInstance ( at at t._measureLifecycleMethod ( at t._initializeControl ( at at e.w [as _scheduleControlUpdate] ( at e.scheduleControlUpdate ( at n ( at t._initializeData ( at t.componentDidMount ( at ws ( at t.unstable_runWithPriority ( at ha ( at Is ( at gs ( at

Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,429)