Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never finish loading... quick edit form #126

Closed
vernetmatias opened this issue Aug 4, 2021 · 13 comments
Closed

Never finish loading... quick edit form #126

vernetmatias opened this issue Aug 4, 2021 · 13 comments

Comments

@vernetmatias
Copy link

Hello Clement,
When I create a record using Flow and then open the record, the control doesn't loads at the first time I open it but if i close and then open again then it loads properly,
here is a print screen it stays like that:
image

then when i go out from the form and reopen it, it loads:
image

@vernetmatias vernetmatias changed the title Never finish loading... Never finish loading... quick edit form Aug 5, 2021
@carfup
Copy link
Owner

carfup commented Aug 5, 2021

Hello,
Thanks for your feedback, I have to try to reproduce the issue here.
Quick one, does it occurs when you create a record from the dynamics UI too ?
If you have knowledge about the developer tool of your browser, can you check and let me know if there are critical errors displayed ?

@vernetmatias
Copy link
Author

ok, here is the file with the errors: yes, there are a few, some are maybe mine but another could be something to do with the control...
editQuickViewErrorLoading.txt

@carfup
Copy link
Owner

carfup commented Aug 6, 2021

Thanks for the log, helpful !
Is the field : "'axx_idrector" your lookup used for the control ?

@vernetmatias
Copy link
Author

no, the lookup field name is "axx_persona", it is a relationship with accounts, here it is an image, and when I reload the form then it loads correctly, and all the errors disapear, here the log from the page when it loads correctly:
editQuickViewCorrectLoading.txt
image

@vernetmatias
Copy link
Author

Hello Clement, any idea?, i think it's a bug, from the control itself, maybe generated because the form loads to much things and it can't finish loading or tries to get data when the form doesn't finish loading, I don.t know... the field "'axx_idrector". Is the field that loads in the quick view form, the first one you see there "ID. Rector". But if I put another field first on the form it changes the field giving the error, always asuming that the first one is undefined, here a screenshot:
image

@vernetmatias
Copy link
Author

Hello Clement, how are you doing?, Do you know what this could be? I wnat to know because if i don't resolve it I won't be able to use your control and it seems to be a small bug maybe. Thanks!!

@radevic
Copy link

radevic commented Aug 26, 2021

Hi, I am experiencing the same issue, exactly as @vernetmatias. I found 2 possible solutions I believe, but would like to verify with other users and @carfup that it is correct.

The problem seems to be that private variable _parentRecordDetails is getting new value in getParams method which is called from updateView. Now, queryQuickViewFormData method does await getLookupDetails method which sets Attributes property of the _parentRecordDetails. But before queryQuickViewFormData comes to call processFormXmlData, it seems that the framework calls updateView multiple times and thus reset _parentRecordDetails leaving it Attributes property equal to undefined. The error happens later in retrieveFieldOptions method when it tries to access techFieldName attribute.

I tested 2 solutions, first is to stop calling getParams method from updateView and call it from init method. I am not sure about this one, although it seems to work for me it might be something I am missing and Clement intentionally calls this one from updateView. Do you see any problem with this solution @carfup ? Second solution is just to create a new private variable for parent record attributes and replace occurences of _parentRecordDetails.Attributes with the new variable.

It would be great to hear from you @carfup about this.

Thanks in advance.

@carfup
Copy link
Owner

carfup commented Aug 31, 2021

Hi,
First, sorry for the late reply, I was off without internet ...
Thanks for the report, I have to dig this as it seems really critical.
Problem is that I'm not able to reproduce the issue you are the first two to report it.
Any chance you could share an access to a MdA which is having the issue ?

@radevic I'll check your two approaches and get back to you.

I have to push a new release soon since I also adjusted the PCF to be bind on a lookup field so :).

Regards,

@vernetmatias
Copy link
Author

Hello,
I don´t know what MdA means but I could give you access to a DEV environment. I could pass you the user and password in private. Or maybe schedule a MS Teams meeting... Let me know...

@carfup
Copy link
Owner

carfup commented Aug 31, 2021

Model Driven App =).
Sure thing, if you don't mind giving me a dummy user just to reproduce the issue this would be perfect.
You can reach me in private on LinkedIn if it's fine for you : https://www.linkedin.com/in/clemolivier/

@carfup
Copy link
Owner

carfup commented Sep 6, 2021

as follow up, @radevic you were right, about the approach.
funny thing is locally I fixed the issue before Matias reported it but I found out about this another way.
This will be fixed with the next release which should be pushed in the next few days !

@radevic
Copy link

radevic commented Sep 7, 2021

Good to hear that @carfup , looking forward to see the next release, thanks :)

This was referenced Sep 7, 2021
@carfup
Copy link
Owner

carfup commented Sep 7, 2021

The release 1.4.0.0 is available to fix this : https://github.com/carfup/PCFControls/releases/tag/1.4.0.0

@carfup carfup closed this as completed Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants