Questions tagged [global-variables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 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 ...
0
votes
1answer
134 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-...
0
votes
1answer
33 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 {!...
0
votes
0answers
15 views

Dynamically get instance URL in a (packaged) Flow

I have checked the list of Global variables on Flows but couldn't find any that is giving me the current instance URL. My flow is opening a Visualforce PDF and I a hardcoded URL just won't work in ...
1
vote
1answer
53 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 ...
0
votes
1answer
14 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
41 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 ...
1
vote
1answer
374 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 { @...
4
votes
1answer
781 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 ...
0
votes
1answer
176 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 ...
1
vote
1answer
43 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 ...
0
votes
1answer
24 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 ...
1
vote
1answer
251 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....
0
votes
1answer
204 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 ...
0
votes
1answer
187 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, ...
0
votes
1answer
165 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 ...
0
votes
1answer
428 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()....
0
votes
1answer
34 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 ...
0
votes
2answers
134 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 ...
1
vote
1answer
63 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 ...
3
votes
3answers
1k 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 ...
1
vote
0answers
128 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 ...
1
vote
0answers
54 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=...
1
vote
1answer
155 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/...
7
votes
1answer
1k 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 ...
0
votes
2answers
2k 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 ...
0
votes
1answer
274 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 ...
0
votes
1answer
194 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 ...
0
votes
1answer
385 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 ...
1
vote
1answer
83 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?
4
votes
1answer
47 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 ...
0
votes
1answer
612 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 ...
12
votes
2answers
2k 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 ...
2
votes
1answer
87 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 ...
2
votes
2answers
704 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. ...
2
votes
1answer
226 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 ...
5
votes
2answers
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 ...
1
vote
1answer
57 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('...
1
vote
1answer
439 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 ...
0
votes
1answer
2k views

Get value in a variable from selectOptions {Selected option}

How could I catch the value {!items} selected and capture it in a variable? I need a simple line of code. <apex:pageBlock tabStyle="Account" title="Merge Accounts"> <apex:...
1
vote
0answers
795 views

UserRole ID in VisualForce [closed]

Writing a VisualForce Page for Opportunity and having an issue with referencing the $UserRole.Id. It saves the way its written but its not doing what we need it to on the actual VisualForce Page. It ...
6
votes
2answers
3k views

Get User Language in Visualforce without controller

I have a Visualforce page without a controller and I would like to get the user LanguageLocaleKey value without having to add a controller (I know it can be done in Apex using UserInfo.getLanguage()) ...
1
vote
1answer
3k views

How can I pass two Id within URL using getParameters().put

currently I send one Id in the URL to my other controller but now I have to send another value within the same URl to my other controller , how can I add the second value to this PageReference ...
3
votes
0answers
135 views

Salesforce global JS objects

Can anybody help me to find official description or any other information about global SalesForce JavaScript objects (not Visualforce global variables)? I know that there are exists some JS objects ...
1
vote
0answers
442 views

Add main.js to Visualforce page

Is there a way to include Salesforce's main.js file using an <apex:includeScript />? On internal pages, the URL is something like this: /jslibrary/1440733404000/sfdc/main.js. I'm not sure where ...
2
votes
1answer
1k views

How to pass a value to a global variable in apex

public PageReference BookerInformation(){ PageReference gotosetup = new PageReference('/apex/bookerinformation?id=' + eventId); List<ProntoEvents_Product__c> products_1 = [...
1
vote
1answer
996 views

Access a boolean variable from the controller by another helper class

I got a boolean variable in my controller class and I want to access that variable to check a condition in another helper class. Ex: Class MainController { public boolean showValue {get; set;} ...
1
vote
2answers
214 views

Getting always zero as total in apex:variable

I am getting always 0 as a result of total. I am using apex:vairable, initialing it before apex:block. Inside the apex:block I am adding the field of object i.e number type with apex:variable and ...
2
votes
2answers
761 views

How do I assign this variable a value?

I found this block of code in the Salesforce docs: <apex:page> <h1>Linked</h1> <apex:outputLink value="{!$Page.otherPage}"> This is a link to another page. ...