You need to sign in to do that
Don't have an account?
jerrymol
Help with Including Lightning Component in a Visualforce Page
I am not sure what I am missing here which leads me to get some error when I include a lightning component in a visual force page.
Let me brief you my scenario:
I have created a lightning component which has some components in it like <ui:inputNumber> and <force:inputField>. I am using the force:inputField component to show a lookup field on a salesforce object. (Let's say case owner lookup). I have added this component in a lightning application and the component is working fine. When I preview the application, I can see it working.. I can select the user name or queue name on the force:inputField.
Now when I add the same component in a visual force page (used <apex:includeLightning /> tag in VF page :kindly see the attached code) I am getting below exception:
'Something has gone wrong. Assertion Failed!: Abstract component without provider def cannot be instantiated : markup://force:inputField : undefined. Please try again. '
Any idea?
Let me brief you my scenario:
I have created a lightning component which has some components in it like <ui:inputNumber> and <force:inputField>. I am using the force:inputField component to show a lookup field on a salesforce object. (Let's say case owner lookup). I have added this component in a lightning application and the component is working fine. When I preview the application, I can see it working.. I can select the user name or queue name on the force:inputField.
Now when I add the same component in a visual force page (used <apex:includeLightning /> tag in VF page :kindly see the attached code) I am getting below exception:
'Something has gone wrong. Assertion Failed!: Abstract component without provider def cannot be instantiated : markup://force:inputField : undefined. Please try again. '
Any idea?
Change your force:inputField to apex:inputField and see if that works
Here is the VF page which include the lightning componenr named testForceField
<apex:page>
<apex:includeLightning />
<div id="lightning" />
<script>
$Lightning.use("c:testForceFieldApp", function() {
// Write a function that creates the component on the page
$Lightning.createComponent("c:testForceField",
{},
"lightning",
function(cmp) {
// do some stuff
}
);
});
</script>
</apex:page>