Questions tagged [dynamic-binding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15
votes
1answer
116 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 ...
14
votes
2answers
7k 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 ...
12
votes
2answers
5k 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 ...
11
votes
1answer
5k 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 ...
10
votes
2answers
2k views

Accessing child records returned from SOQL via generic SObject

I'm currently querying the records of a custom object, including some related child records. Unfortunately the parent object is unknown, so the returned results from the query is a list of SObjects. ...
9
votes
1answer
3k views

Get the sObjectType of a field dynamically

I have a field Board_Name__c that is a lookup from Opportunity back to Opportunity. How can I dynamically find out that Opportunity.Board_Name__c references the Opportunity sObject while Opportunity....
8
votes
1answer
2k views

CurrencyIsoCode - Auto included in query results, except for test cases

I've implemented some functionality around MultiCurrency in a Managed package. Since it needs to be able to support non-multi-currency orgs, all references to the CurrencyIsoCode field are done using ...
7
votes
2answers
1k views

<apex:relatedList list=“{!DontExistInAllOrgs__c}”/ > only solveable with Dynamic Vf components?

Does there exist a dynamic binding mechanism for the list attribute in the <apex:relatedList> element? I want to display a related list for a relationship that does not exist on all orgs where ...
6
votes
2answers
2k views

Reusable components in Managed package (Problem with Namespace)

Lately I have been developing set of Visualforce components "VisualStrap" that can be used to implement Bootstrap inside VF pages easily. So to make the upgrade process easy I made a managed package ...
5
votes
4answers
9k views

Error: Could not resolve the entity from <apex:inputField> value binding '{!variable}'

This seems like it should be very simple and I have no idea why it isn't working. I have a VF page with a controller. The controller has the following property (yes, I made sure to save): public ...
4
votes
2answers
140 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 ...
4
votes
2answers
4k 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 ...
3
votes
1answer
3k views

How can I build a complex Visualforce Dynamic Binding dynamically?

How can I build a complex Visualforce Dynamic Binding dynamically? Yeah, I realize the question seems a bit redundant, but I couldn't think of a better way to describe what I'm trying to do. The short ...
3
votes
5answers
6k views

Dynamic SOQL variable binding not working for multiple records

Am building a dynamic SOQL where I am using a list of strings that represent record ids, here's an example similar to my class: String q = ''; q += 'SELECT Id FROM' + object; q += ' WHERE Id IN :...
3
votes
1answer
215 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 ...
3
votes
1answer
2k 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? ...
3
votes
1answer
71 views

SelectOptions bound to component in inconsistent order

My <apex:selectOptions> component is binding the Set<SelectOption> items in an inconsistent order each time the page is loaded. My expectation was to see the items appear in the select ...
3
votes
1answer
1k views

Issues saving apex:inputfield values to object in controller. Only last field on form saves value

Here's my issue: As per code below, I am trying to display a number of fields dynamically and then allow the user to enter values and save the record (or update it if they are viewing an existing ...
3
votes
0answers
49 views

Why can't I get the size of a List that is the value of a Map key [duplicate]

I receive this error: Incorrect parameter type for subscript. Expected Number, received Text when I try to access the size of a List like this: <apex:outputText value="{!accountsMap[key].size}" /...
2
votes
2answers
2k views

Strange behavior when passing parameters in retUrl and saveUrl

I'm using a VF page to show Contacts. I have a group of categories (related lists) which are checked or unchecked. When I perform an action on the page, e.g. View, Edit, New, I want SF to remember ...
2
votes
1answer
3k 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 ...
2
votes
1answer
761 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 ...
2
votes
1answer
118 views

pageblock is null when accessed from the action function called on click of a button present within the pageblock using Dynamic Apex

I have an apex:dynamicComponent binded to a pageBlock. In the apex controller, I add dynamic apex components like text boxes, checkboxes and command buttons to a dynamic panelGrid and then add the ...
2
votes
1answer
123 views

What are the performance implications or other drawbacks of Dynamic VF Bindings?

I have an abstract class and a couple of descendants of that class. When I do an apex:repeat over a list of instances of the abstract class I can't access anything defined solely in the child classes ...
2
votes
1answer
58 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; ...
2
votes
2answers
2k 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: {!...
2
votes
3answers
624 views

Implementing a form in Salesforce

I am currently the Salesforce administrator of a company Enterprise account. Our accounts are made up of universities. I was asked to implement a form for trips. The trips basic information is: Trip ...
2
votes
0answers
106 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 ...
2
votes
0answers
674 views

Dynamic Visual Force Binding - getting values to Controller (null)

I am stuck at what I beleived to be a simple implementation using Visual Force Dynamic Bindings. I have the following scenario: A Standard Case has a relationship to a Custom Object (we can call it ...
1
vote
1answer
1k views

Need to Implement dependent lookups like dependent picklists

I have two lookups, one for country and one for state. I want that on change of country corresponding state values flows into state look up. How can I implement this? I cannot use picklist due to some ...
1
vote
2answers
55 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 ...
1
vote
1answer
341 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 ...
1
vote
1answer
412 views

Lightning Component JavaScript - dynamic binding to parent object

I am working on a controller that takes an sObject record and finds the values of a list of field names on an Asset: for (var fid in fsNamesList) { var fieldname = fid; var fieldvalue = ...
1
vote
2answers
392 views

added a picklist on standard account object, now can I bind it to custome object

I have added a picklist, Members, on standard account object, I have created a custom member object now can I bind records of this object to above pick list?
1
vote
1answer
630 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 ...
1
vote
1answer
2k 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 ...
1
vote
1answer
312 views

Is aura:iteration reactive?

Say I have multiple components nested under each other, one takes collection of Accounts, the component under Account takes a collection of Contacts. Say I want to programmatically remove one of the ...
1
vote
0answers
43 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
vote
0answers
251 views

Salesforce Email and tokens

So I inherited the Administration of Salesforce from a previous colleague. We use Salesforce tokens to dynamically populate Contact/Lead names, phone numbers and email address and Contact/Owner names, ...
0
votes
1answer
71 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 '{!...
0
votes
2answers
664 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
1answer
36 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 (...
0
votes
1answer
433 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
1answer
695 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
1answer
2k 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
1answer
85 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
2answers
92 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 ...
0
votes
1answer
492 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
2answers
335 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
1answer
2k 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 ...