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
1answer
12 views

How to code 'scoped tabs' in Lightning Design System?

I want to use the 'scoped tabs' component in a demo community on the Napili template. Example of 'scoped tabs' from LDS (Lightning Design System) at ...
0
votes
1answer
10 views

Custom clone button and update custom field values using javascript

I would like to create a custom button to clone a record and set 3 custom fields to new values. Ideally, when cloning, we would use a VF page that only allows the user to change the Name field. F1__c ...
1
vote
1answer
70 views

How can I refer a static resource containing js inside javascript on a visualforce page

I have a zipped static resource uploaded in my salesforce org which contains different types of js . I want them to be referred in my script on visualforce page. How can I do this?
-1
votes
0answers
11 views

If the checkbox is true i want to hide the field(description)after record is saved

If the checkbox is true i want to hide the field(description) in page layout after record is saved. If the checkbox is fale I want to see that field in page layout after record save. how it could ...
0
votes
0answers
10 views

how to prevent bootstrap modal for closing if validation error is occur?

I have one bootstrap modal in that modal body i used apex:pageBlock tag and i used apex:inputField tag to bind custom object fields. There is a mandatory email filed, when i click on submit command ...
2
votes
1answer
14 views

Apex Chart not loading on vf page

I am trying to show an apex:chart on a Visualforce Page, but I receive a javascript error: SfdcCore.js:384 Visualforce Chart: Error loading configuration for chart 'jid0jid1pbjid6jid7': Did not ...
1
vote
0answers
10 views

How to make html datalist compatible on IOS which is present on my visualforce page?

<apex:inputText list="{!listOfStringElements}" id="userInput" onChange="alert(this.value);"></apex:inputText> In the above code the list attribute generates a dynamic datalist but the ...
0
votes
1answer
16 views

sforce.connection.query is not working for force.com sites

Iam trying to query records using AJAX Toolkit Javascript API through force.com sites. But sforce.connection.query not working through sites. The same code working for internal users. Please find the ...
1
vote
1answer
17 views

adding a multi-picklist field into my formula for my custom button

I have a custom button that has a javascript picklist that checks feild criteria. I need to add a multi-picklist field to the if statement to check if it does NOT contain "India". here is the if ...
0
votes
1answer
14 views

Passing a callback function with included parameters

I am trying to pass data to a callback function but it doesn't work... I am using Salesforce "searchAndGetScreenPopUrl" method which is calling callback function. I want to be able to pass some ...
0
votes
1answer
24 views

Showing feedback message using Visuaforce component and and Apex

Scenario: we have an app installed in Salesforce for uploading files (the maximum limit is now 1gb). While uplaoding one file or multiple files the script gives the size and it needs to compare it to ...
-3
votes
1answer
45 views

javascript button in salesforce

I have developed an onclick javascript. I want to show some alert based on some conditions. How to implement this? {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} ...
1
vote
1answer
22 views

How to get child record value from parent in AJAX toolkit?

I have onclick javascript code: var a = sforce.connection.query("select Name,Net_Price__c,(select Name,Net_Price__c,Price_HT__c from Services__r) from Rfleet_Car_Set__c where id ...
1
vote
1answer
23 views

Visualforce Picklist from Javascript Query

Can I draw a Picklist in a Visualforce with a Javascript query? With de ajax connection.js in visualforce, I'm trying to retrieve a list of some values, Ex: var qr = sforce.connection.query(“SELECT ...
1
vote
1answer
31 views

Lightning component with SLDS

I try to build a lightning component with SLDS, lightning design system. The component I want is the tabs. So I use the code given by lightning design system, but since it is static i need to use ...
0
votes
0answers
23 views

How to prevent to run multiple times when click multiple times on one custom button

I have one custom button. When i click on that button, That will send an email. But some times it sending multiple emails because if i click on that custom button multiple times at a time.
1
vote
0answers
10 views

Unable to create locker IIFE: TypeError: getStyles is not a function throws

I have a Vf page which when trying to load gives the following error. Unable to create locker IIFE: TypeError: getStyles is not a function throws at : ...
1
vote
1answer
25 views

How do I validate a input-text field in an Apex Repeat tag by alerting on click of a button if its empty or not?

TEXT FIELD: <apex:repeat value="{!TransTerms }" var="tms" id="repeatTag" rendered="{!showApproval && readOnly == false}"> <div class="textinput" id="inner-div-tc"> ...
1
vote
0answers
25 views

how to bind map<String,map<String,String>> to vf page using javascript remoting

i have 1 @RemoteAction method which is returning map<String,map<String,String>> and i need to bind this with vf page. and this is the code i did till now : <div id="data" ...
0
votes
1answer
16 views

ExactTarget SSJS Bulk Upserting into All Subscribers - Error

I have a JSON object containg Subscriber Key, Email Address and some other attributes. I would like to upsert the All Subscribers with this object, but it seems that Marketing Cloud only upserts ...
1
vote
1answer
23 views

Simple Question about javascript remoting

i have a JavaScript array and i want to send it as an argument to a remote method using javascript remoting , here is the javascript array: var quizQuestions = [ { type: ...
1
vote
1answer
69 views

ActionFunction not rendering to create a Javascript Function

Create a dynamic search custom using the ActionFunction for rendering the JS function to post the values to controller. The search is not working. Here is my code: Controller: public class ...
0
votes
0answers
37 views

Problem with angularJs insertion in visualforce

recently i have moved to angularJs, actually i am working an a quiz app and i want to send the results back to salesforce database. i looked for an angularJs library to communicate with salesforce and ...
1
vote
1answer
14 views

How to read value from pop up and display on parent page and close the pop up

I want to create pop up which will open if you click on a text box. On pop if I put any value and once click on save the same value should be populated on parent page according to option selected in ...
0
votes
1answer
22 views

Custom Javascript Button returns “Unexpected token ILLEGAL”

I'm trying to create a custom button that executes javscript on the Case object. I simply want to check if the Case has a specific child record already and forward the user to that record if it exists ...
-1
votes
0answers
27 views

Not Able to insert record using REST call via VF page

function insertAttachment() { $.ajax({ contentType: 'application/json; charset=utf-8', data: { "ParentId": "a0ab0000005kdfr", "Name":"sdsff", ...
0
votes
0answers
16 views

Error - Refused to set unsafe header “User-Agent”

I'm trying to adapt the below button, which is used in the Opportunity's related Cases list so that it can be used for the Account's related Cases list. ...
0
votes
1answer
14 views

Is it possible to get the account id when i click on New Action in Account

I need some help to get the account id When i click on New Action in Account Step 1: I have created one New Action in Account with the Action type is Visualforce Page. Step 2: When i click on the ...
0
votes
0answers
14 views

Custom Button Ajax CORS Error

Running the following code as a button: {!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}{!REQUIRESCRIPT('//code.jquery.com/jquery-2.0.3.min.js')} $(function() { var params = { // ...
0
votes
2answers
52 views

Run javascript before redirecting to visualforce page - Custom List button

I have a custom list button on contact with behavior as shown below: And this custom button is added to the contact related list on account When I select 2 or more contacts and click on custom ...
0
votes
0answers
23 views

reRender javascript issue IE.?

I am using dropzone multi-upload Drag and Drop upload into salesforce.Its working fine on all browsers except IE. Also on IE as well its not working in only 1 scenario..when i have reRender on the ...
0
votes
0answers
22 views

How to convert UTC time to EST time in javascript?

Hi i am using fullcalendar plugin salesforce.i want to convert UTC time to EST time. My code is function formatDateTimeToEST(inputDate){ if(inputDate.indexOf("T") != -1) ...
3
votes
1answer
59 views

Cannot read property 'navigateToSObject' of undefined in Lightning

I am developing a Lightning component that lists related Contacts. I would like to make it so that when you click on the name of a related contact, then it will navigate to that contact's record. Here ...
1
vote
1answer
46 views

Custom button on list view limitations

I have a custom button on my accounts list view to change the record from the current owner to my ownership using OnClick Javascript. I have admin privileges and when I use the button it succeeds in ...
0
votes
0answers
27 views

Calling an Apex Controller from Lightning Helper

I have a problem calling an Apex Controller from a Lightning Component Helper. I really don't know a way to call the Apex Controller in order to retrieve the data and continue the execution. I think ...
1
vote
2answers
42 views

Trailhead question about why value for outputNumber isn't updating as they request?

Developer Intermediate > Lightning Components > Using JavaScript Controllers With Components The error that Trailhead is giving me is that "Challenge Not yet complete... here's what's wrong: The ...
2
votes
1answer
32 views

calling an apex method from javascript

function check(){ var user = document.getElementById('pg:frm:nPB:ip').value; if(user == ''){ alert('Please Enter noise Name before Proceeding.'); return true; } else{ ...
0
votes
2answers
31 views

Refresh the page twice in Salesforce with Javascript

<script> window.location.reload(); </script> The above code makes the Salesforce page to keep in the reload state when I add this visualforce page as a page layout. I would like to ...
0
votes
0answers
17 views

Click To Dial Not Working

Requirement : To design a VF page from where I can call to Opportunity or Lead using . Issue : I have designed VF page but Click to Dial is not working, on clicking the number it gets disabled for ...
1
vote
1answer
44 views

Is this Apex coding similar to Java scripting?

I don't have prior knowledge in coding. But would like to know and learn more about Salesforce Development and coding in Apex. I heard that Apex is more or like Java script, Is it true? Whether a ...
0
votes
0answers
11 views

How to add values in custom picklist on select of Account lookup Icon?

I am using contact.AccountId as inpufield on vf page. On select of that Account, I want to add picklist value dynamically in custom picklist(without refreshing page).For ex: This functionality works ...
-2
votes
1answer
40 views

How to call two action functions from single javascript function [duplicate]

I have two command buttons cancel, canceAll. I have two methods cancel, cancelAll in conteoller. How can i call actionfunctions from single javascript function based on the button clicked? I tried ...
2
votes
0answers
28 views

URL Whitelisting in Salesforce Console

In the Salesforce console, we have an user action that will open the Email tab using the Email Url. For example: ...
1
vote
3answers
74 views

Why can't I get focus to stay on input field using javascript or apex:actionFunction

I have a page that I use to search Entries in a Journal in our Salesforce Communities visualforce page. The system works just fine, except that I have been asked to make it search upon keyup. This ...
0
votes
1answer
15 views

Input values are not being stored in the controller (Javascript Remoting Help)?

Forgive my incompetence...I have a visualforce "Wizard" I had working relatively well but I have had to change some key functionality to use Javascript to call a Web Service API and return some ...
1
vote
0answers
20 views

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud? Could the FormData be a problem? I've been using this code: var form = new FormData(); ...
1
vote
1answer
42 views

How to display VF Page Content as PDF on button click

As I am in need of display the content of VF page into PDF on button click.How to generate VF page contents as PDF ON BUTTON CLICK using Java Script . Here is my code: <apex:page > <html ...
1
vote
1answer
29 views

Why is this javascript validation not working for the selectlist

The javascript should be checking to see if the user didn't select anything in a select list if the value is the first option which is "Please choose a seminar". It appears to just ignore the script. ...
1
vote
0answers
22 views

EPSON Printer Connection with Salesforce [closed]

I want to Connect My EPSON Printer with the Salesforce from VF page/APEX. Which print the Receipt directly to my EPSON Printer Without asking me the print dialog box. I have Created a one sample ...
0
votes
2answers
38 views

Visualforce pageBlockTable - update values in cells on load

I've been developing a page that displays dollar amounts in a table, and allows updates to those amounts. This table is read from and writes to a JSON string. Some of these dollar amounts have many ...