Questions tagged [dynamic-binding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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

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
1 answer
235 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 ...
0 votes
1 answer
266 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
58 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....
1 vote
1 answer
4k 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
289 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....
3 votes
2 answers
3k views

Get the SObjectType of a record in Visualforce - is it possible?

I have a generic VF component that renders Action Links for records of arbitrary SObject types. Iterating over SObjects in variable record I would like to use such a generic expression in my page: {!...
1 vote
1 answer
894 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
2k 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
79 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
1k 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
1 answer
714 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 ...
0 votes
0 answers
168 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
2 answers
12k 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 ...
1 vote
0 answers
2k 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
5k 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
1k 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 ...
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 ...
4 votes
1 answer
3k views

Custom URL in Canvas App

I am trying to call dynamic URLs of an external app(having same domain but different paths basis clicking on links inside salesforce) in Salesforce using Canvas app. How can this be implemented? ...
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; ...
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 ...
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
63 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
698 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) { ...
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 ...
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 ...
0 votes
2 answers
242 views

getting Internal Server error with dynamic fieldset and standard controller

I have the following inline visualforce page which gives me an internal server error. <apex:page standardcontroller="Agreement__c"> <apex:repeat value="{!$ObjectType.Agreement__c....
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
1 answer
3k views

Lightning Component: Retrieve values from dynamic forms

I have a list of records and an accordion style form for each record: this is achieved with aura:iteration and few <tr> tags. I've used the indexVar on aura:iteration to uniquely identify ...
15 votes
1 answer
161 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
141 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
493 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
753 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 ...
0 votes
1 answer
825 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 ...
14 votes
2 answers
10k views

Picklist Values in Dynamic Lightning Components

Is there an out-of-the-box solution to populate record-type specific picklist values when creating a picklist dynamically (in a Lightning Component) that references an sObject field? At this point ...
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;...
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": [ { ...
1 vote
0 answers
129 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
850 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
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
471 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....
1 vote
1 answer
771 views

Create a custom Apex class or custom object at run time

We have a need where we need to parse an xml schema and dynamically create a custom object with fields at run time. Have any of you guys done this and if so can you share code snippets? If the custom ...