0

In the documentation for lightning:recordViewForm it explicitly states that it does not use Lightning Data Service. Also, nowhere in the documentation does it say that the record view form is only supported in some contexts. However, when placing the component in a standalone lightning application or in a component placed into Visualforce via Lightning Out, the component fails to render any data. No errors are shown, but the data simply does not render. Is there any official documentation on whether or not this is supported outside of Lightning Experience?

Edit With Error

Looking at the console reveals the following uncaught error from the framework.

Uncaught (in promise) AuraError {component: "lightning:recordViewForm", componentStack: "[lightning:recordViewForm]", action: null, name: "TypeError", message: "Error in $A.getCallback() [Cannot read property 'apiName' of undefined]", …}

Edit with Reproduction Gist

Use the following to reproduce this issue. Note that you will need to supply a record id from your org. https://gist.github.com/dsharrison/a923568a2f3658abe4bb35f5ce089578

  • this should work, please share your code, maybe something there is not right – Itai Shmida Nov 29 '17 at 9:01
  • @ItaiShmida I just added a link to a super simply gist that reproduces the issue. – dsharrison Nov 29 '17 at 18:58
  • I have created your scenario - works good for me, maybe it is an API version issue - check all your file api versions – Itai Shmida Nov 30 '17 at 7:26
  • Odd, all API versions are set to 41. If this is working for you though I will have some other people try to see if it's just me. The only difference that might matter for me is that I am in a namespaced org (even though I am dealing with standard objects here). I will try in a non-namespaced org as well. – dsharrison Nov 30 '17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.