Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [global-variables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
91 views

How to store large amount of data in a variable for a batch bypassing heap size exception

I am stuck with the following error: 'Batchable instance is too big: ProductDiscountsFormatterBatch' I have a junction object called Account_Product_Discounts__c with the information of, for each ...
Arnau LS's user avatar
0 votes
1 answer
35 views

I want to add number 7 as setting so that we won't need to update it with code change. Can we add this in Global settings? If yes, how? pls check code

So I have a formula field to check number of due days and I am checking that in my apex controller in 'if condition', if it is less than 7 or not. However, I have a requirement to make changes so -- &...
SF Learner's user avatar
0 votes
0 answers
100 views

Unable to display User's Account information using global variable {!CurrentUser.accountId}. I pass this into my LWC to display info, but get an error

HTML: <template> <!-- <lightning-record-form object-api-name={objectApiName} record-id={contactId} layout-type={layoutType}> </lightning-record-form> --> <...
Ogunseyin Magnus's user avatar
2 votes
1 answer
236 views

If I use a { get; set; } on a field in a Global class, will that get/set be public or global?

If I have a class that is global and I use the getter setter implementation: Integer myInt { get; private set; } Will my variable myInt be a global or a public variable?
David's user avatar
  • 33
-1 votes
1 answer
1k views

How to pass variable from helperclass to finish method in batchclass

I have a bachclass with a scope of some records. These records have a startdate and enddate field. With a helperclass I set the earliest startdate and the lates enddate of these records in 2 variables....
Thomas's user avatar
  • 2,298
0 votes
1 answer
2k views

Can I pass several variables (set and maps) to finish method of batch

I have a batch process which loops trough records to count different statuses per user. I store these in a map. When the Batch is done I want to update the results on an aggregated object. How do I ...
Thomas's user avatar
  • 2,298
1 vote
1 answer
37 views

Global access modifier used for cross-application access

Often when we read about global access modifiers we come across that it "should be used for any method that needs to be referenced outside of the application". Now I understand that in case ...
Agent47's user avatar
  • 35
0 votes
0 answers
547 views

Combine global variables and custom labels in email templates

I am trying to dynamically place {!$Network.NetworkUrlForUserEmails} in a custom label for an email template. I want to confirm if these two hypothetical solutions are possible: 1. Include global ...
Salesforce_Noobie's user avatar
0 votes
1 answer
869 views

How to use getInstance() with 2 parameters

I have a class with a method from which I want to make an instance but on saving the instance method I get the error: Method does not exist or incorrect signature: void getInstance() from the ...
Thomas's user avatar
  • 2,298
1 vote
1 answer
1k views

Delete/Update Global Value Set values using Tooling API

I'm trying to update or delete values in my Global Value Set. I succeed insert new values with the code below: but when I change SetMethod to DELETE I get Bad Request with status code 400 is there ...
Shoval's user avatar
  • 13
1 vote
1 answer
612 views

How to filter in a batch query on dates

I have a soql query in a batch process where I want to filter on dates. I currently get the error: First error: unexpected token: Start_Date__c. How do I advoid this? Apex global Database....
Thomas's user avatar
  • 2,298
0 votes
1 answer
3k views

How could I get values from a global declared map, inside a @future method?

I'm facing an issue of accessing objects, That is the first time I'm trying to use Global variables on APEX ; I got a @future main method that calls two methods, In the first method I would like to ...
Alexis MASSON's user avatar
2 votes
3 answers
8k views

Make child rows selected on selecting parent row - lwc tree grid

Is it possible to implement the logic - when parent row is selected all its child rows are selected as well with lightning web component and tree grid? HTML: <lightning-tree-grid key-...
Valentine Potapov's user avatar
0 votes
1 answer
813 views

Global Variables - VisualForce Page - BaseUrl [duplicate]

I have a simple Visualforce page with just an Iframe inside. I want to send as parameter to this Iframe the Instance URL. To do this I use Global Variables, it is working for other parameters like {!...
Raphael D's user avatar
  • 616
1 vote
1 answer
398 views

Change/remove global method signatures or variables

I want to remove an unused custom sobject in my managed package, but it's part of a global method signature. Is it possible to remove the global method from the managed package or change the method ...
YXY's user avatar
  • 130
2 votes
1 answer
126 views

Static resource not able to access global merged fields

{!$Component.idPageTestCase.idForm.idFocusedTab} This works well when it is there in Javascript tag inside visualforce page, but fails when the Javascript is moved to a static resource and the static ...
Nagendra Singh's user avatar
0 votes
1 answer
296 views

How To Pass Lead Email Address to IFRAME?

How do I pass a lead email address to an IFRAME? I did the following steps: Created a new test lead. Went into gear icon > Setup > Custom Code > VisualForce Pages, and created a new VisualForce Page ...
Volomike's user avatar
  • 111
0 votes
1 answer
409 views

Variables in Schedule class losing values

I have a schedule class that class a batch class passing the source and target to merge child records from source to target. Below is the schedule class. global class FIMCConsolidationSchedule ...
Hemavantha Rajesh Varma Mudunu's user avatar
1 vote
1 answer
3k views

How to use @invocableVariable in Callout

I want to use the processbuilder to do a callout. In this callout I want to add some variables from the current record but get variable does not exist see below: global class or_service { @...
Thomas's user avatar
  • 2,298
7 votes
1 answer
9k views

Variable not visible

When I try to save the code (API version 43), I keep getting a compile error stating: Error: Compile Error: Variable is not visible: testClass.XYZ at line 5 Here is the class: global with sharing ...
Kalyan's user avatar
  • 73
1 vote
1 answer
1k views

can i pass all lookuprows values to javascript?

currently i am using this ampscript for lookuprows: %%[ var @rows, @row, @rowCount, @numRowsToReturn, @lookupValue, @i set @lookupValue = AttributeValue("lookupField") /* value from attribute or DE ...
kuml's user avatar
  • 573
1 vote
1 answer
330 views

Salesforce Global Values organization-wide (sandbox vs. production)

Is it possible to add custom global values in Salesforce so that we can use that global value in any apex class or controller? And this values will be Ids of custom objects, so they will be different ...
Shivangi Patel's user avatar
0 votes
1 answer
77 views

Custom Link to handle multiple events

We currently have a custom link on an Account page layout on Salesforce Classic. The link currently adds a Salesforce account to an external system. I would like for it to mark a checkbox on the ...
mplax's user avatar
  • 373
1 vote
1 answer
809 views

What is the window.userContext and where is this loaded from?

There are several JavaScript Global Variables offered by Salesforce. I was trying to locate some documentation around window.userContext but could not find anywhere. We are trying to use the window....
Rushi R's user avatar
  • 11
0 votes
1 answer
720 views

How to get/set a global variable/setting during or after login in apex

My idea is to have identical code executing in all environments to solve the issue when refreshing or creating new sandboxes. I want the code to determine where it is executing and based on the ...
Daryn's user avatar
  • 251
0 votes
1 answer
679 views

Variable does not exist in global method - batch class

I have tried to put together a batch class to update parent Account records with credit scores.. I need to make 2 list variables public so I am able to access them in the finish global batch method, ...
CharniW's user avatar
  • 57
0 votes
1 answer
405 views

Accessing hierarchical custom setting via global variable

It is possible to read hierarchical custom setting via $Setup(= global variable); however, each profile/user needs to activate the security feature Customize Application. Activating that security ...
Cuban coffee's user avatar
  • 1,574
0 votes
1 answer
1k views

Test a parameter from anonymous window

I am debugging code where it gets parameters from an opportunity record page but it seems to return empty. How can I test this in an anonymous window: productFamily = ApexPages.currentPage()....
Jenssen's user avatar
  • 419
0 votes
1 answer
78 views

How can I reference an installed pkg VF page in an OnClick Javascript Detail Button

I need to update this hardcoded url before an instance refresh and I am having difficulties finding a solution. The VF page is from a managed package that has the namespace of scl I have tried to ...
Jason's user avatar
  • 852
0 votes
2 answers
471 views

Using Global variables inside of Custom Metadata with Visualforce page Modal

What are design options for the following requirements? End user specifies the text of a Modal window to be something like: Hello [User Full Name], Because you chose [Case.FieldA] goto this <a ...
jangiz's user avatar
  • 133
1 vote
1 answer
110 views

Binding Fields in List With $ObjectType global variable

Is it possible to bind Binding Fields in List With $ObjectType global variable. I have a few fields of Contact object to be checked if createable. Is it possible if i store all the field names in a ...
Saumya Gaikwad's user avatar
3 votes
3 answers
2k views

How can I use a global variable within a javascript if statement?

This is the code I've been trying to use within my visualforce page. My idea is to detect which user is using the page, and then have the javascript do something depending on who it is. The code below ...
user avatar
1 vote
0 answers
259 views

Package org adds namespace prefixes to $Setup and $Label references - sometimes

In order to establish separate developer orgs for package development, I'm removing namespace references from the code held by a package org. However after a Visualforce page is saved to the package ...
Felix van Hove's user avatar
1 vote
0 answers
62 views

Global attributes on Visualforce tab (to Lightning Component)

I built a Lightning Component I am using on a record page by sending global attributes via the appBuilder: <aura:attribute name="attr1" type="Integer" access="global" /> <aura:attribute name=...
Simonp's user avatar
  • 1,892
1 vote
1 answer
355 views

How to retrieve access in Javascript using Global Variable?

I read here that we can access ObjectType from Global Variable.I want to check if the user able to edit Account using updateable .But how to write it? I tried this {!REQUIRESCRIPT("/soap/ajax/30.0/...
unidha's user avatar
  • 2,552
8 votes
1 answer
2k views

Salesforce lightning: how to add a custom global value provider

This question has been raised before but I haven't seen a satisfactory answer to it. Basically I want to make global variable (which is a chart object reference) available to all components (for ...
ian church's user avatar
0 votes
2 answers
4k views

Simple Custom Global Variable

I need to run a scheduled job every few hours to refresh my API token for a 3rd party source. I want to store that API token in a global variable so I can access it from my controller. (I'm building a ...
qarthandso's user avatar
0 votes
1 answer
574 views

Two Visualforce Page Same Controller

I have an issue that I am using two VF page with common controller. One VF Page is normal and other is opened as a modal on the 1st Visualforce page. I am adding some elements on 1st VF page in a list ...
AKSHAY Dhiman's user avatar
0 votes
1 answer
392 views

Using the $Action Global Variable when the object type is ambiguous

When building links in Visualforce, I typically prefer using the $Action global variable and URLFOR(). e.g.: <apex:outputLink value="{!URLFOR($Action.Account.View,Account.Id)}" > As far as I ...
martin's user avatar
  • 12.7k
0 votes
1 answer
507 views

Global variable vs class variable [closed]

I have been using a global variable such as $UserInfo.getUiThemeDisplayed in a visualforce page several times for rendered conditions. In this case which is better, using a class variable or global ...
Venky's user avatar
  • 634
1 vote
1 answer
413 views

Changing global class member type

I have a global class member in a managed package that I am working on with type Id. Can this member be changed to a type String in a future release of the package?
Suryatej Mukkamalla's user avatar
4 votes
1 answer
60 views

Can global members be added/removed from Beta packages freely?

Global things can't be un-global-ed once they hit production. However, I need to debug something in a sandbox and want to generate a temporary beta build with some methods made global. Can I switch ...
Vincent Lee's user avatar
0 votes
1 answer
2k views

Writing to global variable/state from apex?

I'm writing a bunch of Apex triggers that access an external web site. This site issues a token which is valid for a period of time, so I'd like to store it someone globally and reuse it, rather than ...
steve cook's user avatar
12 votes
2 answers
3k views

Can variables with inline get/set not be @AuraEnabled?

I have an existing class that works with a REST API from a managed package. This class represents the payload that the REST API accepts in implementations, so it has a number of variables that use ...
dsharrison's user avatar
  • 3,992
2 votes
1 answer
340 views

Cannot Access Global Variables in Force.com Site

I'm trying to use the global variablee '{!$Organization.Id}' and '{!$Profile.Id}' in a visualforce page. When I access the page directly from apex/MyPageName the variables are picked up ok from the ...
RedQueries's user avatar
5 votes
3 answers
8k views

Evaluate Current User for Flow - 15 - 18 digit User ID

I need to evaluate the current user running a flow. Someone suggested I use the Global Variable {!User.Id}, but it's returning a 15 digit Id. I need to compare the current user with the Account owner. ...
Ruth Turaew's user avatar
2 votes
1 answer
768 views

Use Global Variable $Setup in Lookup Filter

Since global variables can not be used in Filter criteria, I created a formula field, to pass it through. But referencing this formula (with global variable) in a Lookup Filter does not work Custom ...
itsmebasti's user avatar
  • 6,457
5 votes
2 answers
1k views

How to use $A.set() or how to add a custom global value provider?

I am a little bit confused. Knowing that not all features which are available in a pure aura project are exposed to Lightning Components I thought it is mandatory to check against the Salesforce ...
Christian Menzinger's user avatar
1 vote
1 answer
159 views

Combine Multiple Boolean checks in VF Markup

I want something like the below in my test to see of a outputPanel should be rendered <apex:outputpanel rendered="{!recordType == 'System Change Request' & $currentPage().getParameters().get('...
Our Man in Bananas's user avatar
1 vote
1 answer
763 views

The installed managed class zqu.ProductSelectorController is not visible

I am getting this error trying to use a custom visual force page in place of a managed package visual force page. I made my custom controller global, thinking that it was mine that needed to be ...
Mark Kogon's user avatar