Questions tagged [variable-scope]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Public map value returns null after first batch iteration

I'm working on a CSV parser that I now want to handle the processing of more records. By doing so I'm porting my existing apex class to a batch class. I execute my batch with: Database....
4
votes
2answers
54 views

static collection variable not accessible elsewhere

Does anyone know why I can't do this? Here's a domain class public class Opportunities extends fflib_SObjectDomain { public static Set<String> DIRECT_RECORD_TYPES = new Set<String> { ...
0
votes
1answer
78 views

@AuraEnabled methods and fields : field declared as @AuraEnabled not available in @AuraEnabled method

I am new to lightning and i have written a controller for the component. public class TScontroller{ @AuraEnabled public Case caseDetail {get;set;} . .// few @AuraEnabled variables declared as above ....
0
votes
1answer
66 views

How to pass query variable from soql into loop

I am trying to bulkify a callout where I want to pass the recordtype in my loop but I get: Error: Variable does not exist: RecordType If I try public RecordType personAccountRecordType I get ...
2
votes
2answers
1k views

Variable does not exist - global Boolean and webService Argument

I am trying to pass an argument from a webService function within a global class and assign it to global variable within that class, but when I try to call the value within the class, or even within ...
2
votes
2answers
249 views

Where/How can I store a variable and access while I build my wrapper? It's either null in wrapper itself or the scope isn't visible at top level

I have a set of ids called oppIdsInWrapper inner class. However while I build my wrapper, this is always null and empty. I want be able to reference this as I build my records to avoid duplicate ids. ...
0
votes
1answer
103 views

Execution Context Variable Scope In The Tidy Trigger Pattern

I've read through Nuances of Working with Tidy Trigger Pattern, but I'm still struggling to understand something: For what portion of the life of the "execution context" does an attribute of the ...
0
votes
1answer
440 views

Bootstrap modal in Lightning Components

I am building a Lightning component for a community and we are being asked to use Bootstrap to stay consistent with the corporate style guide. There is a modal form in the component, and I want to ...
25
votes
1answer
685 views

SOQL bind variable scope behavior

After I posted this question, I found a similar post that seemed to answer it: Variable scope - database.query() has access to variables not in scope. I'll leave this in place for now, as I am not ...
0
votes
2answers
258 views

how to get the list populated from the return command?

Hey Guys and thanks for all the help. my problem is how to get the "Animals" from the return command my code is as follows public class AnimalLocator { public static List <String>...
2
votes
2answers
1k views

Duplicate Variable Error

Can you guys please help me out here Error: Compile Error: Duplicate variable: a at line 24 column 18 trigger accountfuels on lead (after insert){ if(trigger.isinsert) { ...
12
votes
1answer
529 views

Variable scope - database.query() has access to variables not in scope

I was answering a question and this little inconsistency popped up. Just wondering if anyone has come across it before, or if anyone knows why this happens. A variable that is declared within some ...