douglascayers / sfdx-record-create-url-component

Lightning Component that supports URL parameters to pre-populate a record create form.
https://douglascayers.com/2018/08/05/legitimate-url-hacking-in-lightning-experience/
23 stars 15 forks source link

recordId "pop-under" not working... #1

Closed savage25 closed 5 years ago

savage25 commented 5 years ago

I just implemented this, thank you so much! I believe there may be an issue though: When I opening the link into a new window (using target="_blank") and send "recordId", I see the "new record" popup come up briefly, but then it closes as the underlying record loads. If I do not use recordId parameter (so that the background stays blank), it works. It also works if I do not open into a new window (no "target" on the href)

douglascayers commented 5 years ago

Thanks @savage25. In testing tonight, I've noticed that the component needs to give the page a little more time for the background to load the record before trying to show the "create record" action. If the navigation is slow, then it happens after the "create record" modal is shown and thus the modal is closed prematurely. This is all a hack, but to add to the hackiness, I think I'll just add a timeout of ~1 second and hope for the best.