Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support ...

learn more… | top users | synonyms

1
vote
0answers
20 views

Debugging VisualForce Pages in Google chrome

Sometimes I need to debug my visualforce pages for console application and this is what happens. When I step through the javascript during debugging, For any of the calls encoutered for ...
4
votes
1answer
34 views

Custom Email button works for me but not my users

Afternoon all, I have a custom button on my Opportunity object to Onclick Execute Javascript to send an email to a specific email address, code below: ...
0
votes
0answers
9 views

How to define id:String in sforce.console.openPrimaryTab instead of null in salesforce?

I want to define ID in openPrimaryTab(), so that I can ID corresponds to an existing primary tab, the existing tab will redirected to the given URL because the Salesforce console prevents duplicate ...
0
votes
1answer
14 views

Pass currency value to custom field using JavaScript button

I need to populate a currency custom field Value_Of_WE_Spend__c on a custom object WE_FEP__c with the value from an opportunity currency custom field Annual_Settlement_Value__c. I've written the ...
1
vote
2answers
27 views

Bootstrap 3 VF javascript not working

I am trying to implement the bootstrap accordion feature: http://getbootstrap.com/javascript/#collapse-example-accordion So I upload the static resource and included in my VF tag But when I ...
0
votes
1answer
10 views

Is it possible to get personalization strings when pulling content from DE with Server-side JavaScript in emails?

I'm trying to use server-side JS to dynamically write variables based on the column headers of a data extension for an email. Then fill those variables with the row contents of those field headers. I ...
1
vote
0answers
13 views

Console JavaScript button behavior inconsistent on same Contact recordtype

In order to use the Service Console to display relevant details from Account/Contact/Asset while a Case is being created, I have a button on the Contact record that creates a 'shell' Case, saves it, ...
1
vote
2answers
24 views

Error on selecting value from dynamic picklist

I am getting error while selecting value from a dynamic picklist. The picklist values are generated on form load by selecting the distinct values for a field in an object. Class public ...
-1
votes
0answers
12 views

How to create multiple result ID in openPrimaryTab() of console by callback:function?

Respected Experts, I am trying to set unique ID per I trigger from different search buttons. Currently, I am having automatic ID in my subTab i.e scc-pt-0, scc-pt-1,..and so on. How can I set ...
1
vote
1answer
22 views

Access controller property with Javascript visually immediately - after page load but before user action

I want to be able to access a controller property with Javascript to do some styling (based on the value of this property) so that it appears visually to be executed immediately on page load. However, ...
2
votes
2answers
35 views

Trying to get lookup field value in JavaScript

I have a custom object named CPQ_Request_for_Proposal__c, which has a lookup(Text) value for Account__c. I'm trying to code a button which will use the value of Account__c to get actual Account ...
0
votes
1answer
31 views

Open a new window on click and new tab on right click of a home page layout link

Open a new window on click and new tab on right click of a home page layout link. I managed to open a new window with following syntax. window.open(url, mywindowName, height="200", width="400"); ...
1
vote
1answer
39 views

Allow user to only select one check box in visualforce page

I have a visual force page which dynamically displays multiple records with check box's. I need to allow the user to select only one check box at a time. I know it is possible with only javascript. ...
0
votes
1answer
19 views

Check the current field value before updating in custom button

I am creating a custom button that will update the Status field on the Case object to "Resolved". Before the field is updated, I would like to first check if the field already is set to "Resolved". ...
4
votes
1answer
56 views

Why does a lookup to custom object on sites give invalid ID?

I am developing an internal site for all company employees (basically an intranet). I am using a visualforce page but it must be externally available because not all company employees have a ...
2
votes
1answer
16 views

Odd JS Remoting Behavior

I am in the process of porting an AngularJS application to Visualforce and Apex. For some of my services, I am using a custom controller with remote actions. Since this app will be included in a ...
0
votes
2answers
28 views

Custom Clone Button - Default values to blank

I would like to create a custom clone button on the case object that clones all of the case but I want two fields - Escalation_Stats__c, Escalation_2 to default to blank. Below is the code I am trying ...
2
votes
0answers
20 views

Visualforce Charting rendererFn with Chart label

I am using rendererFn for chartTips "<apex:chartTips height="40" width="120" rendererFn="renderChartTip"/>" and it changes the label for hover over the bar chart. We need the same behavior for ...
1
vote
1answer
91 views

How to create Map<String,List<String>> in Javascript?

How to create Map<String,List<String>> in Javascript? Push method does not seem to work if we define aMap = {} and if(aMap [key]) { ...
0
votes
1answer
22 views

Javascript HashMap to Visualforce Remoting Method

Can we pass HashMap from Javascript to controller? Where aMap['a123']=['xy','yz']; and aMap['b456']=['ab','bc']; I want a remote action method with Map> parameter in controller.
2
votes
0answers
34 views

Javascript SOAP API external access

I am trying to call our Salesforce SOAP API from an external server using JavaScript, but I am getting an error because the URL it is using is from my localhost server. I am getting this error: ...
1
vote
1answer
52 views

Can I hide a custom button on standard page based on some field value?

I want to hide a standard or custom salesforce button on standard page. I don't want to use record type based layout to do that.
2
votes
1answer
172 views

javascript error in if condition. “Unexpected token &&”

In a javascript i am storing an array of values. My question I want to compare each and every index value. When I am using && I am getting error saying var result =<value>; ...
1
vote
2answers
58 views

Custom button javascript error on Unexpected token ILLEGAL

I have a custom button where I want to check for conformation. I wrote my javascript for conformation but I am getting error that A problem with the OnClick JavaScript for this button or link was ...
1
vote
1answer
17 views

Access API/Sobject name from List Button

I have a visualforce page that will be accessed via a List Button. This VF page relates to the case object and the list button will appear on several object UIs (opportunity, account etc) related ...
1
vote
1answer
10 views

Convert record name from lookup field to string field value in JavaScript

I'd like to use the name of the opportunity, which a case is being created from, as the case Subject, for easy reference. My cases are being created using a custom button & JavaScript. I can't ...
1
vote
1answer
21 views

Create new case, assign record type, add to queue & populate other case fields

I need to create a New case custom button which will be displayed on the Opportunities object and selects the record type, while also populating other fields on the case page layout. The easiest way ...
0
votes
0answers
20 views

Problem with OpenPrimaryTab in Console - “openPrimaryTab: Opening a duplicate tab is not allowed.”

I have came across an issue that I am unable to solve in the Console: I have a formula field which holds a clickable icon which should be used to indicate that a change has occured to the Object. ...
0
votes
2answers
17 views

validations for a table of Input Fields

I have a series of Input Fields(Name,Quantity,Price) in table format in Visualforce page. By below JS i can validate if fields doesn't have any text by using their 'StyleClass(requires)': function ...
6
votes
1answer
83 views

Lightning: Bug in Lightning framework when using aura:renderIf?

I have a Nav component which contains the following: <aura:renderIf isTrue="{!v.showAllProducts}"> <c:showAllProductsCmp/> <aura:set attribute="else"> ...
0
votes
1answer
33 views

Remembering the state of Visual Force page

I have a requirement where I need to remember the state of Visual page. This is required for example in case of governor limit. Can we do this with static JS or is there any JS API available?
2
votes
0answers
18 views

Delay query while user is typing in Lightning Component search bar

The Lightning Components Tutorial contains an example where a query is executed when the onkeyup event fires. This results in the query executing for each letter typed into the search bar. I would ...
2
votes
1answer
40 views

JSON for Autocomplete functionality in VF

I'm trying to get my autocomplete functionality to work in my VF page for a TextField. I need to obtain the List of a custom Object from my controller (with the name and the ID of the record). I use ...
0
votes
1answer
37 views

List Button pass multiple IDs to apex page

I have below javascript code on List Button that should pass multiple IDs to the mentioned VF Page. But this gives out an error encountered for Unexpected string. Can someone please help me here? ...
1
vote
2answers
44 views

How to call Jquery on On Click event

Unable to Call jquery Function on Onclick Event. <apex:page > <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" /> <style> ...
2
votes
1answer
65 views

Access sObject list variables in Javascript

Question: I need to create list of sObjects in Javascript. Let's assume accountWrapperList is a list of (Account + checkbox) defined in controller. You can access this list in your javascript if you ...
1
vote
1answer
37 views

Why is my lightning js function freezing at the event.setparams?

I am trying to get this demo working in my org: http://www.johnbrunswick.com/2015/01/salesforce-lightning-example-ideas-experiment/ My component has an onclick that is supposed to display a modal ...
0
votes
2answers
47 views

Is there a way to dynamically select all multi-select values on a Visualforce page?

I'm trying to automatically select all available offices below..
1
vote
1answer
35 views

Change the Color of Bubble on OnClick Event

I need to Change the Color of Green Bubble on Onclick event and when User Click on other Bubble the Color of bubble which was Clicked earlier should be the Older one. Any way to Achiev this. Tried ...
0
votes
2answers
39 views

Redirect one viusalforce page to another page automatically using javascript

Can anyone tell me how to redirect one visualforce page to another visualforce page automatically ? below is my visualforce page : < apex:page standardController="Account" ...
0
votes
2answers
38 views

Detail Page JavaScript button on Custom object

I have a custom object that has lookup to Contact. I need to create button on the custom object "Pipeine__c" that when I click it creates a NEW Task and it copies the contact name from the ...
4
votes
2answers
183 views

Is it possible to execute remote functions in order?

I am using javascript remoting. I have a situation where I need remote actions to execute in order. The problem I am running into is the second remote action executes prior to the first one ...
0
votes
0answers
20 views

Clicking button it should reload the page, the callout must be perform asynchronous

My question is that clicking button it should reload the page, The callout must be perform asynchronous. Now its works like a reloading the page after finishing the callout. Custom Button : Execute ...
1
vote
0answers
12 views

Mass/Bulk Update Campaign Member Status Over 200

I am looking to update all of the related Campaign Members' Statuses from a Campaign based on the execution of a JavaScript button and an APEX Class. The button below works to update the status from ...
1
vote
0answers
21 views

Draw on Google Map within Visualforce

I'm wanting to be able to free-form draw on top of a map within a Salesforce page if possible. I believe this can be done but am having a hard time getting the code to work. Any help is appreciated. ...
1
vote
1answer
48 views

Close pop up and refresh parent page javascript [closed]

So what i want to do is close pop up and refresh parent but after few seconds delay to make sure all data is received. currently i have the following function closeAndRefresh(){ ...
2
votes
1answer
25 views

Get Selected lookup ID from javascript method

There is already some question about this but i did not find a working solution. I'm trying to access in a javascript function the selected lookup value ID of an input field. Do you know how can i ...
1
vote
1answer
32 views

what is the use DOM in sales force where we can use that?

I have understanded the abbrevation of DOM,but iam not understanding what is use of that in sales force.Is there any link between xml and DOM.
1
vote
1answer
44 views

utilising javascript in HYPERLINK function of a formula field

I want to execute this Javascript from the HYPERLINK function in my image formula field. This way I can display an image in a certain circumstance (using IF) and then do something via the Javascript ...
0
votes
0answers
13 views

can anyone help me when we select values and click the button the checkbox field value to be changed?

All i have a custom button when i select some values and click the button the Checkbox field value to be changed to true when its false and same way if its value to be false then changed to true. can ...