Questions tagged [create-component]
For questions concerning the $A.createComponent() method in lightning components.
25
questions
0
votes
1
answer
32
views
Embed LWC row buttons in Visualforce? Actionfunction oncomplete not working
I need to embed an LWC stateful button component in the rows of VisualForce output that appear after being refreshed from an apex:actionfunction call to an Apex custom set controller. The purpose is ...
0
votes
0
answers
110
views
How to show picklist values while creating a dynamic component using $A.createComponents method
I have built a component that will dynamically create a record edit form & record view form. The problem is with the record edit form, for the picklist field the values are missing as shown in the ...
1
vote
1
answer
59
views
Load previous state of dynamically created component
How do I load the previous state of the lightning component that is dynamically created which is embedded inside another lightning component in the Utility bar.
Component in Utility Bar: SampleCreator....
1
vote
1
answer
255
views
Aura Component not passing field values to flow when using $A.createComponent and cmp.getReference()
I have an Aura Component which I'm using to dynamically show a set of fields based off of a record type. This is done using Custom Metadata to store the association between record type and field that ...
2
votes
1
answer
456
views
Lightning component: Invalid Literal Value[1,1]: Javascript :Getting the below error at random when opening the component in ipad salesforce1 app
i have created a lightning component and that component is dynamically created and called from another component using
$A.createComponent(
dynamicComponent,
I am getting the below error at random ...
2
votes
3
answers
2k
views
Is it possible to dynamically create LWC from aura component?
We can't dynamically create LWC like aura does. We can embed LWC in aura, is it possible to dynamically create LWC using $A.createcomponent within aura component?
1
vote
0
answers
160
views
How to close dynamically created Tab in Lightning
On click of a button Tab is created dynamically, using attribute "endIconName":"utility:close", close icon placed in the tab. how to close this tab.
$A.createComponent("lightning:tab", {
"label":...
0
votes
1
answer
154
views
Order of dynamically created components not correct until page refresh
I am dynamically creating multiple Lightning components in my Community. They are not displaying in the correct order until the page is refreshed. Thoughts?
Here is what I want my page to look like -...
0
votes
2
answers
728
views
Import and use strike components
I'm new to salesforce development so this will be probably a very trivial question but I'm stuck here.
I'm trying to import and use Strike lookup component
So I have imported all the files in the ...
0
votes
2
answers
2k
views
Dynamically creating lightning:inputField with a div
Currently I have this loop which can dynamically create a lightning:inputField:
for(var i = 0; i < editFieldsToRender.length; i++)
{
$A.createComponent
(
"...
2
votes
1
answer
924
views
Can not instantiate any component from JavaScript in lightning
I can not instantiate any component from JavaScript in lightning.
1. I took a specific component namespace:ModuleCard and checked that when I include it statically (just put <namespace:ModuleCard/&...
1
vote
1
answer
818
views
$A.CreateComponents callback is not working
The issue is that createComponents method is being invoked but the $A.CreateComponents callback is not getting executed
controller
({
doInit : function(component, event, helper) {
...
3
votes
1
answer
596
views
Lightning component not rendering dynamically created lightning components
I am trying to create a lightning component that gets data from a server and displays them in individual lightning components which are dynamically created. I built a prototype, and I am trying to get ...
1
vote
1
answer
126
views
Re-create or Reload Lightning component from Visualforce page
I have a requirement to Reload a lightning component from a Visualforce page based on the Tab clicked in VF page with different Values.
<a id="{!formKey}" onclick="hideShowPickList('{!...
2
votes
2
answers
763
views
Dynamically created component executing method twice in communities
following the Dynamically Creating Components component documentation, I have created a button in my lightning communitiy that does the following:
Creates a modal
Creates input buttons based on a an ...
2
votes
1
answer
662
views
Dynamically created ltng:require component results in 503
If I try and create a ltng:require component for a script dynamically, I get a 503 server error:
component.cmp
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" ...
7
votes
1
answer
1k
views
$A.createComponent requires aura:dependency to work for first use
I posted this question on Twitter and folks seemed to feel this wasn't expected behavior, so posting here to see if others have experienced\have better solution
I have three components. CMP A is a ...
1
vote
0
answers
183
views
How to Set options dynamically ui:inputSelect created by CreateComponent
I have created ui:inputSelect using CreateComponent method.
I have set onchange event on that inputSelect.
onchange of an controlling field I have to set options for another inputSelect(dependent ...
1
vote
2
answers
836
views
Dynamically created html tag is not working in IE
I tried to create a HTML Div element dynamically with $A.createComponents();
It's working fine in chrome, safari, firefox, but in IE, it throws an error
This page has an error. You might just need ...
2
votes
3
answers
1k
views
Unknown component 'markup://'... on $A.createComponent
I have this error when trying to dynamically create a component, where the first time it runs it runs okay but if run again afterward it errors.
renderListItems: function (cmp, helper, recordIds) {
...
2
votes
2
answers
4k
views
Action failed: lightning:button$controller$handleClick [d.run is not a function]
I have a lightning component called modal which is used in another component called Split, the modal takes an array of buttons to render them (and does some more)
I have a working version of it in ...
1
vote
1
answer
892
views
Invoking another component in lightning salesforce
In my lightning component, calling a method on onclick event and in turn which calls an another component. which works fine but whenever the page is refreshed it fails to call the component on First ...
-1
votes
1
answer
581
views
div element not found while using $A.createComponent [duplicate]
I am trying to create a div using $A.createComponent but its throwing error.
`$A.createComponent("aura:HTML",
{
"tag": "div",
"HTMLAttributes":{"id": "filter-"+ ...
13
votes
5
answers
17k
views
How to close lightning:overlayLibrary custom modal?
The documentation shows how to close an overlay immediately after showing the modal, however, this is not very useful for real-life situations.
I have a component which has a lightning:...
1
vote
1
answer
3k
views
Dynamically create a tab in Lightning component
I have a lightning:tabset with one tab containing a list of records. When user clicks on a button next to a record I want to display a second tab with the record detail.
My component looks like this:
...