Questions tagged [bind-variable]
The bind-variable tag has no usage guidance.
22 questions
4
votes
1
answer
2k
views
Is IN operator equivalent to Equal operator in SOQL when binding a list variable?
While testing some SOQL queries I noticed that the Equal operator behaves like the IN operator when using a list bind variable
All the queries below run without any error and return the same result ...
3
votes
0
answers
2k
views
Retrieve Journey Name using ampscript or ssjs
Does anyone know how to retrieve the Journey Name using either ampscript or ssjs? I want to populate the name inside of a variable when the email is sent through a journey? Something similar to ...
2
votes
2
answers
5k
views
SOQL RecordTypeName vs RecordTypeId
Id recordTypeId = Schema.SObjectType.Lead.getRecordTypeInfosByDeveloperName().get('ZS_Lead').getRecordTypeId();
List<Lead> leads = [Select Id, Name, LeadSource, OwnerId
...
2
votes
0
answers
37
views
are binding variables in dynamic soql not required to be in scope at the time of query? [duplicate]
This code works even though contactID is not in scope at the time of the query. Can anyone explain what is going on here?
String query = 'SELECT Id FROM Contact WHERE ';
if (true) {
String ...
1
vote
1
answer
5k
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 ...
1
vote
1
answer
381
views
Set Salesforce LWC Variable from D3 data
I am able to visualize my D3 chart within a Salesforce LWC component, but now what I want to do is when I click on a selected node within the D3 code, I want to pass the selected node data (d.data) to ...
1
vote
2
answers
2k
views
apex:inputField and Javascript
I am curious if there is a way to show/hide my <apex:inputField> once I start typing AND save the data to a custom object.
Option 1:
I am able to do this functionality with a <input> tag ...
1
vote
0
answers
113
views
REGEX With bind variable inside flow screen not working
i'm doing a field validation inside a flow screen with the regex formula field:
!REGEX({!CustomerNumberList}, **{!Account_Customer_Number}**)
And it seems the second argument is not being binded by ...
0
votes
1
answer
2k
views
Using Python and simple salesforce with parameters “Bind variables only allowed in Apex code”
dict = sf.query("SELECT Id,FirstName,LastName,Email FROM Contact WHERE Id=:cid")
cid is a variable defined by myself. I wonder how to use the simple query function to select the field.
Any response ...
0
votes
1
answer
4k
views
Bind checkbox value with controller boolean variable
I have checkboxes on my vf page
<apex:inputCheckbox id="checkboxShowP" value="{!P}" onchange="show(this);"/>
In the controller class
public boolean P{get;set;}
I want to bind this checkbox ...
0
votes
1
answer
65
views
Is it possible to bind filename with javascript on apex repeat?
I have a simple apex repeat with add filename tag. When I add the following line "inputfile" the previous line shows no file chosen. Is it possible to bind the filename with the inputfile button with ...
0
votes
1
answer
1k
views
Binding input to a hidden variable with JS
I've got a datepicker attached to an input text, and I need to make the text value available to my apex variable "LaunchDate." It's not binding. I even tried putting onfocus="SetLaunchD()" in the ...
0
votes
1
answer
500
views
How to bind variable in .js-meta.xml file of LWC component?
Javascript :
import { LightningElement, api } from 'lwc';
export default class ApcApiArticle extends LightningElement {
@api prevPart;
connectedCallback() {
this.sfdcBaseURL = window.location....
0
votes
1
answer
337
views
How to get get filesize by id inputfile component
How do I get get the filesize by id of the inputfile component into javascript. Currently I get the error checkIfEmpty is not defined.
Visualforce
<apex:repeat ...
0
votes
1
answer
561
views
How to pass parameter to recordEditForm on init
I have 2 child components in a wizard the first on the first page the second on the second page. I pass a recordtype Id from the first component to the second component trough an event how do I pass ...
0
votes
1
answer
42
views
How to pass itteration id value to to another component
I have an iteration from where I want to display a component and cant seem to get the values displaying from my other component Error: Unable to get value for key 'opleiding.Id'. No value provider was ...
0
votes
1
answer
257
views
How do I pass Aura v.recordId to a string literal attribute?
I am trying to call an OmniScript from a quick action.
Documentation provides an Aura wrapper for this purpose.
The Omni Script takes recordId as ContextId.
Aura passes recordId as {!v.record Id}
The ...
0
votes
1
answer
237
views
Apex class DML query using bind variable
The line "Integer days =" has an error, which I am trying to bind the Case record id to get "days" to be passed to the "createCase.Date_Due__c = date.today() + days; " ...
0
votes
1
answer
172
views
How to Pass parameter value from controller to Apex:repeat getValue()
I wonder, how can I pass input variable to getValuesForRepeat in apex:repeat please. I.e, my apex:repeat renders different contents depends on inputVar1.
Basically,
<apex:repeat value="{!...
-1
votes
1
answer
504
views
I need to run a range of IDs into my query to get the name, Parent, and Primary Address from Accounts
When I enter the following code, I keep getting the error message
Bind variables only allowed in Apex code
I am unsure how to make it so I can enter multiple IDs and get back the information I am ...
-1
votes
1
answer
91
views
Is SOQL variable binding parameterization?
If you bind a variable in a SOQL query, is that equivalent to parameterization?
And is there a difference in behavior between static vs dynamic?
-2
votes
2
answers
604
views
Dynamic SOQL with bind variable when variable equal to null
I saw some strange from my point of view behavior for SOQL in apex when tried to compare with variable that is null, like:
Date notInitializedBirthdate;
List<Contact> cnts = [
SELECT Id, ...