Questions tagged [parameters]

A parameter is a variable, it is used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are called arguments.

Filter by
Sorted by
Tagged with
3
votes
3answers
6k views

Aura: init of child component executes before parent components init, alternate approach?

I am new to Salesforce lightning, just started using aura tags. I have to pass parameters to a component (Aura Table) inside parent component (no inheritance), Unfortunately child component's init is ...
1
vote
1answer
459 views

Attempting to get retURL into variable in Apex trigger, returns null

I have a custom button from a Case to create an Order, and in it I pass the retURL and the saveURL so it can return to the Case once the Order has been created (or save is cancelled). This all works ...
1
vote
1answer
4k views

Passing parameters from a Test Class into an APEX Class that is called on a Visualforce page

I am creating a simple project to learn Salesforce and APEX. Currently, I am taking in a file that the user uploads, parsing it, and reading it line by line to check for a particular value, and then ...
0
votes
1answer
898 views

Visualforce Page: include Page with changed Parameters

I have a VF Page referencing a VF Component to display a PDF attached to a Record. Both Page and Component are part of a managed package. The Page is included in the standard layout of the record to ...
0
votes
1answer
376 views

Bind Collection To PageReference Parameter?

I have a list of 15 record ids. I converted it into string (comma seperated value). Now I want to pass this string using pageReference but in url it gives only 10 records. What can I do? Code: for(...
1
vote
1answer
842 views

Pass Contact's Account Id from VF page to controller

I'm trying to follow this simple example. Controller public class MyController { private final Account account; public MyController() { account = [SELECT Id, Name, Site FROM ...
1
vote
2answers
168 views

Using contains logic in APEX using URL variable

I am a rookie when it comes to APEX, but here goes...We have a form which outputs a URL parameter on a new VF page containing a major. This is supposed to display any orientations available for that ...
2
votes
1answer
3k views

Deployment Error: “Invalid parameter value” on one of my custom profiles during Dev > Dev deployment

I am deploying a brand new Custom Object and all associated Custom Fields from one Dev environment to another Dev environment. I'm receiving the "Invalid parameter value" error on one of my custom ...
1
vote
1answer
3k views

How to pass parameters from a VF page to a controller extension

I'm trying to get a few inputs from the user in a VF page and passing them to the controller for processing and eventually updating the page's current record. I've been looking all around for a ...
0
votes
1answer
99 views

How can I pass input parameters into a hyperlink?

I'm a beginner in Visualforce pages & Apex. I'd like to use the inputfield value that is entered by user in order to pass it through an URL as a parameter. The URL would look like : "http://<...
1
vote
1answer
365 views

Vf page error when try to delete row on vf page

I'm leaning a VF Page Creation. I'm try to create page from which i can save muliple account. in which i've to implement, add and remove row. i'm able to add row perfectly as required but unable to ...
2
votes
1answer
2k views

Passing in values from javascript to apex action function

What I'm trying to do is on column click, I want it to execute a backend function to store the value that was selected. <apex:pageBlockTable rows="5" rendered="{!(foundResults==true)}" value="{!...
4
votes
1answer
3k views

RestContext.request.params.get gives null value for Test Class

RestContext.request.params.get gives null value for Test Class Following is my code and Debug logs : APEX CLASS : String accountRecordId= RestContext.request.params.get('accountRecordId'); ...
1
vote
1answer
451 views

Unable to Access Page Error

I am trying to edit the Probability value in the Stage field on the Opportunity Sobject, but when I click save it gives me the following error: The value of a parameter contains a character that is ...
5
votes
4answers
2k views

Why am I unable to pass an Opportunity from a Lightning Component into an @AuraEnabled Apex controller method?

I have a Lightning Component with an Opportunity attribute. The controller calls a helper method, which obtains the Opportunity from the component and attempts to pass it into Apex to be saved. I am ...
4
votes
1answer
5k views

How to get/pass parameter to VF page via JS? How to update field with value from VF page? (updated with BOTH parts)

1st part I have a long-ish question and I will break it into two parts. First, how to pass parameter to VF page via Javascript? I want to click a button and it will take me to VF page and give it ...
1
vote
1answer
5k views

How to open in lightning experience a custom visualforce page that requires parameters?

Scenario: I have two custom visualforce pages called, reportlist and reportshow. The reportlist does not accept parameters and opens via an app's tab in salesforce classic. The reportlist displays a ...
0
votes
1answer
307 views

Passing report parameter in Salesforce1?

We have a google chart on our Engagement__c object, that is written to run a report on click with a passed parameter. This works perfectly in the browser. However, when clicking the link while in ...
2
votes
1answer
408 views

In the Service cloud console the home tabs for objects are displayed differently

We have observed some UI changes to the service cloud console especially with the home tabs of the objects with regards to the list views and buttons . The list views and buttons are following the ...
3
votes
1answer
434 views

Url parameters for Data Import Wizard

I'm wondering if it is possible to define URL parameters for the new Data Import wizard. https://xxx.salesforce.com/dataImporter/dataimporter.app Simply put I would like to pre-select a custom ...
-2
votes
1answer
2k views

Remove getParameters from the url

ApexPages.currentPage().getParameters() by having the above line its generating parameters: DEBUG|pageref : System.PageReference[/500/e?ekp=500&ent=Case&isdtp=Ww&isWsVw=true&...
1
vote
2answers
68 views

How parameters works which we pass in class

public static void updateAdminContact(List<Accreditation__c> newApplicationList) { Set<ID> accSet = new Set<ID>(); for (Accreditation__c ad : newApplicationList) { ...
1
vote
1answer
1k views

Override VF page in Service Console?

I have a VF page that overrides the standard pages for New/Edit/View actions on the Case object. However, I wanted to control when a VF page would display, vs when a standard page would display, ...
0
votes
2answers
1k views

apex:param null in controller

I cannot pass apex:param to controller public class TestClass { public String paramFrom { get { return 'Hello param!'; } } public String paramTo { get; set { ...
1
vote
1answer
70 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
2k views

How to remove parameters from url?

I've tried something like this PageReference pr = ApexPages.currentPage(); pr.getParameters().remove('id'); but that doesn't seem to have worked as the id returns on the next page.
2
votes
1answer
2k views

Pass parameter from html select tag to controller

I want to pass parameter that selected from html select tag to my controller (assign it to string "city") what should i do to achieve this ? --Visualforce-- <select> <option value="" ...
16
votes
2answers
29k views

Passing Parameter to batch apex

I need to pass parameter to the batch apex class. This is apex class: global class batchNotesInsert implements Database.Batchable<sObject> { global Database.QueryLocator start(Database....
0
votes
2answers
412 views

What parameters to open calendar with a link?

I have an <apex:commandLink> that opens calendar page in a new tab : <apex:commandLink value="Calendar" target="_blank" action="{!showCalendar}"/> In controller, I have : public ...
0
votes
2answers
2k views

Pass a parameter from one controller to another controller

I would like to know how to pass a parameter from one controller to another controller? For example I am trying to pass the accountId value by using the following code in the first controller public ...
10
votes
3answers
25k views

How to pass parameters for Lightning component called via quick a action

I have a lightning component which is included inside a visualForce page. When accessing the page directly with a url parameter 'Id' this works fine (component loads inside the vf page and display ...
1
vote
1answer
4k 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 ...
0
votes
1answer
526 views

Change current record ID in URL

I have a toggle button between 2 different views (detail and list) of an object (ie all calls for a sales rep). In the list view the sales rep or the date can be changed to retrieve for another rep ...
0
votes
1answer
26 views

Including sensitive values in PageReference when redirecting

Controller for PageA processes some data, then redirects to PageB along with some sensitive values. How can I safely pass these values to controller for PageB? i.e. cannot put them in PageReference....
-1
votes
1answer
1k views

Visualforce Page redirect not working in apex class constructor

In visualforce page URL, i have one parameter 'id'. In apex controller class, i have written code in constructor like below: public myconstructor(){ String ObjId = ApexPages.currentPage()....
1
vote
0answers
30 views

Is it possible to use Page.Parameters to set the retURL in a VF Component?

I have been asked to create visual flows for Service Console users for complex Case types. I'm testing with an existing flow, using a VF Component to create a button that launches the flow. Clicking ...
2
votes
2answers
2k views

Pass IDs from apex controller to an apex batch class

Can I pass IDs from apex controller to apex batch class? Can someone please show me some examples? Can't find in google search. I need just a reverse of below link. https://developer.salesforce.com/...
2
votes
3answers
1k views

How to detect in visualforce page if what object it is based on parameter ID

This is the sample link: https://ap1.salesforce.com/a0X9000000AlE7h Is there a ways to know if what object it is in visualforce page?..
1
vote
1answer
184 views

How to detect/determine that this parameter ID belongs to this Custom Object

I have linkId = ApexPages.currentPage().getParameters().get('Id');. I want to determine wether what object this ID belongs. Is it Sample1_Object__c ID or Sample2_Object__c ID.. This is a sample debug ...
-2
votes
1answer
1k views

SOQL query in a javascript button

On Contract object, i have a javascript button, which is supposed to pass the ID the related opportunity and account as a parameter to a page. How do i handle scenarios where SOQL query fails to ...
0
votes
0answers
315 views

How to pass a dynamic parameter name into visualforce?

<apex:repeat value="{!comp_set}" var="fieldName"> <div class="form-group"> <label for="emailaddress" class="col-sm-4 control-label">{!fieldName}</label> <div class="...
0
votes
2answers
983 views

How to get parameters from a dynamic field in visualforce page

Image below is my visualforce page to select what are the fields I want to add to the Booker Information. This is my apex code for the form/fields: public PageReference BookerInformation(){ ...
-1
votes
2answers
41 views

Search on product when either area or customer is assigned and subsequently return the product in a search result - Not working

I have a search page with a search box which returns a product (Sku) based on the product name the user enters or the description of the product itself. With present code, the product is only ...
2
votes
1answer
614 views

Parameter passing issue in salesforce1 app

I am passing a parameter from vf page A to page B through URL and getting it on controller of B.It is working when I tried in browser.I created a app for salesforce1 and when I run it ,I am not able ...
-3
votes
1answer
105 views

Trouble passing a $Component [closed]

I have a small problem sending an Id through a $Component. Thanks everybody! <apex:page standardController="Entrada__c" extensions="BA_vista_item_entrada"> <style> .ct{text-align:right;} ...
0
votes
1answer
1k views

Base64 Encode email address in url parameter within a link in the email

I am trying to base64 encode a subscriber's email address within a link in an email. I am using Exact Target and trying to encode the personalization string %%emailaddr%%. this is what I have so ...
0
votes
1answer
763 views

Why am i not getting values from visualforce page on my controller?

when I try to get the selected values from picklist and the inputText value by clicking the command button, it's not really passing them to my controller. VF: <apex:page controller="...
3
votes
2answers
4k views

escape quotes javascript string coming from page parameters

I got a bit stuck on this little problem. I have a page that get's it's parameters from a layout button(url & formula). I need to use the parameters inside javascript ( angular). My problem is ...
0
votes
1answer
509 views

visualforce page with parameters in Unit Test

I cannot understand whats going wrong in this unit test. Last assert is failing: array is out of bonds. Thats a fragment from test class: static testMethod void testRemoveContact() { ...
1
vote
1answer
863 views

Passing Trigger: Method does not exist or incorrect signature

I'm trying move majority of my code to Apex classes and minimize on the trigger code. When I pass Trigger.old and Trigger.new to class methods, I keep getting this error: Compilation error: Method ...