Questions tagged [dynamic-binding]
The dynamic-binding tag has no usage guidance.
84
questions
0
votes
1
answer
92
views
Dynamic color based on condition LWC
i want to fill the svg color based on condition
JS :
get OpptColorIcon() {
const colors = this._listOpp.map(opp => {
return opp.Scoring === "weak" ? "#FF8C00" : &...
0
votes
1
answer
44
views
Issue related Dynamic SOQL query
I have written a dynamic query for filter data at run time based on the different condition.
string squery='Select id, SVMXC__Serial_Number__c, SVMXC__Serial_Number__r.Name, SVMXC__Service_Order__r....
0
votes
1
answer
1k
views
Dynamically Pass Bind Variables to a SOQL Query With queryWithBinds Method
I was going through the new feature from Spring 23 release regarding Dynamically Pass Bind Variables to a SOQL Query With queryWithBinds Method. It seems like it is working when there is only one ...
3
votes
1
answer
218
views
Register dynamically Connected App: was anybody successfully done it?
Register dynamically Connected App: was anybody successfully done it?
I tried to follow the steps provided in this article
https://help.salesforce.com/s/articleView?id=sf....
0
votes
1
answer
158
views
How to Create Dynamic Bound List Variable Names in a Loop for Dynamic SOQL
I'm trying to create a dynamic SOQL string based on the type of fields being used. If the field is a text area, it contains a list of comma delimited strings. For each text area field, I create a list ...
1
vote
1
answer
791
views
How to get property from lightning web component based on button clicked
I have a dynamic lwc that generates related lists dynamically. I want to add a New button to the component but want to be able to dynamically get the component from which the new button was clicked so ...
0
votes
2
answers
2k
views
Assign dynamically values in fields via field API name
I am trying to populate a field with the value of another field dynamically based on custom metadata types.
I use the method variable.put(fieldAPIName, value) in order to populate the fields.
Here is ...
0
votes
1
answer
1k
views
LWC - How to clear my input text fields when saving?
When saving a record, my input fields should is replaced with empty value (clear the text field) and I am having issue with the one within the iteration. I have 2 inputs that are not part of the ...
0
votes
1
answer
1k
views
Dynamic field rendering depends on object fields in LWC [closed]
I got a requirement that the LWC form fields rendering has to be dynamic. Say if I add a text box field in object then in front end(LWC), it has to come automatically without any coding in LWC. Some ...
0
votes
1
answer
64
views
add Datetime values inside IN query clause in a different context
I am trying to create a query dynamically which contains the Date and Datetime values with IN clause with WHERE
For example,
SELECT Id FROM Opportunity WHERE Program__c IN ('Online','On Campus') AND ...
3
votes
1
answer
893
views
Dynamic csv generation for a dynamic soql query in apex
When constructing a csv via apex how do we avoid hardcoding the recordString assignment within the query loop?
Note I have a dynamic List<String> fieldsList that represent field names. For ...
0
votes
0
answers
157
views
Dynamic object is not getting inserted
I want to insert dynamic object with dynamic fields and value. I have written below code in execute method and i am getting "Attempt to de-reference a null object" error and not finding where I am ...
0
votes
1
answer
994
views
Add both dynamic and literal CSS classes to the same element
Pretend I have an element that I wish to give a literal class, such as:
<p class="slds-text-title">My Title</p>
But I also have a dynamically determined class I wish to add, which I ...
0
votes
2
answers
11k
views
LWC Dynamically Show a field based on picklist value
Based on the Subtopic__c or SubSubtopic__c (I know great API names) I want to show a text box called Other. I have looked at some documentation and based on what that has stated this should work. Take ...
0
votes
1
answer
690
views
Calculation in Einstein Analytics Dashboard JSON - dynamic reference line
I am adding a dynamic reference line to a combo widget and the line needs to show an average conversion rate.
Monthly conversion rate is presented well, as the column calculating this value is set ...
1
vote
0
answers
1k
views
Dynamically assign sObject field details in LWC
I have created a inline editable LWC. This solution is dynamic i.e. to add a new field on the table , i just have to add on field set and based upon field type and access, it will be displayed in the ...
1
vote
1
answer
5k
views
Custom Inline Editable Table in LWC
I have created a Custom Inline editable table in LWC. Here are the details:
Apex Class : I am getting the fields to be displayed from Field set and created one wrapper class to pass the fields ...
6
votes
2
answers
4k
views
LWC best practice call child method
see example https://developer.salesforce.com/docs/component-library/tools/playground/q8rtcVIBf/79/edit
Parent component
<template>
Value in Parent : {objMap.key}
Value in Parent : {...
2
votes
2
answers
4k
views
How to retrieve field attributes from dynamic fields in lightning component
I am loading my fields dynamically trough a fieldset. Using aura:id="requiredField" on the lightning:inputField I can get the fields using a map in the controller. I have made some fields required at ...
0
votes
1
answer
962
views
Hot to make a dynamic lightning:inputfield required
I have a fieldset which I get from serverside and load on clientside I am adding the required parameter to the field but my component does not alert on required. I added the values behind the fields ...
0
votes
2
answers
1k
views
Dynamic row values inherits the values from row before in lightning component
I have a lightning component where in I have a few text fields and 2 picklist fields, controlling and dependent. The problem is whenever I try to add a new row dynamically, the new row will take the ...
2
votes
1
answer
67
views
Is it possible to rebind for dynamic SOQL in a more scalable way?
I came to the realisation that it isn't difficult to create my own String Interpolation, like this:
public class XAP_UTIL_MapInterpolation implements XAP_UTIL_InterpolationIntf {
String template;
...
0
votes
1
answer
2k
views
Error message: Invalid literal value [1, 1]: 'WorkOrder' - Lightning Components - Dynamic Binding
I have a issue, I'm trying to create a Dynamic Form with two lightning Components and fieldsets, each component's related to an Object 'WorkOrder' and 'WorkOrderLineItem'. I pass the API names of each ...
0
votes
1
answer
58
views
The dynamic component shows empty when rendered from another component
I am rendering the dynamic component based on the profile the problem is when its loaded it shows the dynamic component in that not the fields which i have in the dynamic component.Below is the code ...
0
votes
1
answer
2k
views
Dynamic vertical tab lightning component
I am bout to create an dynamic vertical tabbar which gets its content from a query later on. This turns out to be an issue as the aura:iteration seems to be not filled at the point of time the init ...
0
votes
1
answer
674
views
How to get related objects and fields of a parent object dynamically?
Can any one suggest me how I can get related objects and their fields of a parent object.Here is the code I have tried so far:
public void discoverRelatedAccessibleFields(sObject newObj) {
...
4
votes
2
answers
1k
views
Can Apex SOQL query variable binding be done in a method other than the method which invokes Database.query?
Apex Commons has some brilliant solutions, but one of the things which I feel is missing is an object-oriented approach to the SOQL query's "WHERE" conditions.
I'm presently working on my own ...
15
votes
1
answer
157
views
Passing calculated values to components makes them immutable
I'm calculating a value while I pass it to a component. But for some reason this makes it immutable, so I can't update it in my component. These are some cases I played with:
<aura:application ...
0
votes
1
answer
130
views
How is this markup fixing the error?
In a custom VF page I get the following error :-
System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Campaign.Product__c
Error is in expression '{!...
3
votes
1
answer
487
views
Are dynamically created components bound the same as child components?
I have a lightning component that dynamically renders an indeterminate number of child components.
Each child component represents an item in a list. I iterate through the list and create different ...
2
votes
1
answer
2k
views
Dynamic checkbox only eveluates to true
I have a dynamic checkbox generated trough an iterator.I want to be able to get the true and false values from the current state of the checkbox.
When ik check or uncheck my checkbox is always ...
1
vote
1
answer
746
views
How to fetch the accounts based on a value checkbox
I have a dynamic checkbox generator which is bound by city on the account which works fine all cities are rendered with a corresponding checkbox. When I select the checkbox a city is added to a list ...
3
votes
1
answer
7k
views
How to bind dynamic checkboxes to id
I have a couple of checkboxes which I dynamically create trough an iteration. In want to use these to trigger a function.
My issue is when I select/check 1 checkbox all the others get checked ...
0
votes
1
answer
808
views
Lightning Component Field Binding conditional expression
In a component, initially i was binding a case picklist field value as an attribute. But now, i have requirement to bind it to a different field based on a boolean flag.
Original Code snippet (inside ...
0
votes
1
answer
3k
views
Wrapper class dynamic access to fields [duplicate]
We have wrapper class:
public class Meta {
@AuraEnabled public Integer total;
@AuraEnabled public Integer count;
@AuraEnabled public Integer offset;
@AuraEnabled public String orderBy;...
13
votes
2
answers
8k
views
Dynamic field binding in Lightning (e.g. lightning:input)
This is to me the most restricting drawback of Lightning compared to Visualforce. A way to dynamically bind/access properties like values of fields.
To make complex component structures fast I don't ...
1
vote
0
answers
128
views
Can event.source() be stored as attribute in dynamically created component without destroying source when dynamic component is reloaded
Use Case
I have a parent container that has a single reusable modal component. There is also a container with many rows of line items rendered as individual components. In certain circumstances a ...
-1
votes
1
answer
845
views
How to pass a String from Visualforce to Apex, then re-rendering the page
I have a VF page that displays a table of records. I'd like the table to be filtered by one of it's String fields, "currency", so if I chose 'USD', it will only show records with 'USD', same for 'CAD',...
0
votes
1
answer
1k
views
Binding dynamic multiselect step
I would like to bind multi-select dynamic step in a title of a chart but can't figure out how to do that.
This is the step:
"step_1": {
"datasets": [
{
...
0
votes
1
answer
6k
views
How to get sObject field value
This question is related to more or less that I have asked here
My question is, how to get the field value from sObject to little demo you here.
Here is my vfp:
<apex:page controller="...
0
votes
2
answers
1k
views
How to bind <apex:inputField> using dynamic sObject
Is that possible to bind the sObject field in the visualforce page?
I'm getting the below error but not sure its helping me but I'm sure it has to do with mySobject that I have in the inputField
I ...
0
votes
2
answers
463
views
Dynamic Component OutputField Bound to SObject
I am trying to bind a field to an outputfield dynamically apex, but in doing so I get
value for <apex:outputField> is not a dynamic binding!
This does not work:
Component.Apex....
0
votes
0
answers
149
views
Issue with dynamically rendering inputField from fieldset in Visualforce page
I have a page where inputFields are rendered from a fieldset on Opportunity object.
When I load the page, it loads correctly.
But when any server side action is done and page is re-rendered an error ...
12
votes
1
answer
6k
views
Lightning - dynamically creating element and binding it's attributes
I'm trying out to generate input elements dynamically and wasn't able to bind value attribute.
I getting following error when trying to display component:
testDynamicBinding.cmp
<aura:component ...
1
vote
1
answer
44
views
JavaScript reading visualforce binded variables
I need some help understand how JavaScript and Visualforce interact.
I have a eventListener that works perfectly when the DOM is loaded:
window.addEventListener('DOMContentLoaded', function() {
if (...
2
votes
0
answers
132
views
Is it not possible to use Dynamic binding of sObject fields in a Lightning Component? [duplicate]
I'm trying to loop a list of sObject fields and displaying the fields as column in a table.
In Visualforce, we could bind an sObject field like value="{!Contact[fieldName]}". But I'm unable to make ...
0
votes
1
answer
373
views
I wanna have a <apex:selectList that automatically fetches select options from an object's field
How to achieve a functionality where i have a
<apex:page>
<apex:form>
<apex:selectList id="countries" value="{!Location__c.Country__c}"
size="1" required="true"...
0
votes
0
answers
1k
views
Can we create a lightning component attribute dynamically and inject it in the component mark up from the controller/helper?
I am trying to create components dynamically in a lightning component. However, the HTML markup or DOM inside which these components are being created are also not static. I am also creating the DOM ...
4
votes
2
answers
5k
views
Can we create HTML markup dynamically from helper/controller in a lightning component?
Lightning gives us the scope of creating aura components dynamically from the controller/helper using $A.createComponent/createComponents. However, I was wondering if there is a way to create HTML ...
0
votes
1
answer
4k
views
How to use field sets in a lightning component to create a multi-grid structure form with a lightning look and feel?
I am trying to create a lightning component that would render a form based on a picklist selection. I read this post below and was able to kick start my development
How to use fieldsets with ...