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

0
votes
0answers
7 views

Turning Skuid's lookup field dropdown into an auto-complete [on hold]

Currently with lookup fields Skuid will create a dropdown of sorts that allows you to click the record you're looking for and move on. Typing a complete record name and tabbing to the next field does ...
3
votes
1answer
61 views

Visualforce onclick javascript redirect doesn't work

I'm struggling with javascript redirect. I've got two buttons (google button is there just for a test): <apex:commandButton onclick="toGoogle();" value="Google"/> <apex:commandButton ...
3
votes
0answers
29 views

Functional programming utilities in apex

I've heard that in javascript world there is an emergent ecosystem of functional libraries (like lodash, rxjs but also es6 promise) and also in the java world (guava or Java8 with lambdas). Is there ...
2
votes
2answers
46 views

Javascript show/hide fields based on picklist value

<apex:page controller="newOpportunityController" tabStyle="Contact" > <body> <script language="javascript" type="text/javascript"> function hidefieldsforfemale() { ...
2
votes
2answers
17 views

Pagination Sorting with jQueryDataTables rerender problem

I found the javaScript jQueryDataTables for pagination and sorting. I add the code and the javaScript to my org and visualforce page. If I open the page for the first time, the script works fine, but ...
4
votes
0answers
39 views

Post to Chatter With Binary File from Javascript

So I'm trying to post a feed item to Chatter via the Chatter REST API from Javascript. There relevant documentation shows that the request must be made as a mutlipart/form-data request, so I'm ...
1
vote
3answers
41 views

JavaScript on Onchange event from picklist

I am working on VF page - when I change the value of a picklist field then my pageblock table will show. VF code <apex:page sidebar="false" controller="AllObjectCtrl"> <apex:form> ...
1
vote
0answers
13 views

Polling in lightning component

What's the best way to implement polling inside Lightning component. I'd like to update my component every 5-10 seconds, calling backend (i.e. Apex class) to obtain new data for rendering. Seems like ...
1
vote
1answer
20 views

Loading an external url html

I have a button that goes to a page and that page generates a url to copy and paste. Is there a way that I could load that page and access the html to parse out the url and go directly to that url? ...
1
vote
1answer
30 views

Javascript query not finding existing field

There is some small work going on with a custom javascript button in an org that I do not have Admin access to. It fails on a field that clearly exists. ...
1
vote
0answers
18 views

canvas-all.js:825 Uncaught #<Object>. in canvas.all.js fie

Scenario: My .NET-based application is deployed on some other application server (not Heroku). I have put the following JavaScript code on my .NET application page: <script ...
4
votes
1answer
25 views

What does the Lightning component method component.isValid() do?

I have read in the Lightning Component Developer guide that it is recommended to use the component.isValid() check any time you are referencing a component in asynchronous code such as in the helper ...
0
votes
1answer
29 views

VisualForce - JavaScript formatting of date returned using Remote Object retrieve

So using a remote object retrieve I am receiving a date in the following format: Wed May 06 2015 00:00:00 GMT-0700 (PDT) What's the best way to format this as MM/DD/YYYY using JavaScript?
2
votes
0answers
26 views

Retrieve shared data extension column names with SSJS marketing cloud

I am trying to retrieve the column names from a shared data extension in the Marketing Cloud. I am using the follow code. This code is working with data extensions which are not in the shared items ...
0
votes
1answer
23 views

Hide / Show custom button on same pagelayout based on profile

Can I Hide/ show a custom button on same pagelayout based on profile? Please let me know if that is feasible.
0
votes
0answers
12 views

ExactTarget REST API - using jQueryto get accessToken

I am trying to get an access token using jQuery. I get a cross origin error but the network transaction is 200 OK. I know this question has been asked before but I cannot comment on it as I am new to ...
2
votes
1answer
18 views

Adding a year to a preset data using Javascript in custom button

I am currently creating a custom button on a custom object in Salesforce that will create a new record of that same object with some updates. One of those updates is to capture the current Effective ...
-1
votes
1answer
33 views

Add and Remove from pageBlockTable [closed]

i'm trying to come up with javascript or jquery to add and remove (which requires index to remove form SObject list)row of object onClick of button. Apex code public with share class ...
1
vote
1answer
17 views

Cannot use String in Apex REST

I'm trying to use String.escapeEcmaScript(data) in an Apex REST class, but it seems like String class is not visible. @RestResource(urlMapping = '/Test/*') global class TestREST { @HttpPost ...
0
votes
1answer
57 views

AMP script / JS Base64Encode for images create wrong code

I'm trying to create a dynamic QR code to be sent in a triggered mail, but since QR codes are not supported (only bar codes are) am I using Google API to create one. I then try to base64 encode the ...
1
vote
1answer
17 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
26 views

Custom 'Submit for Approval Button' on Lead not Working

We replaced standard Workflow button(submit for Approval) on Lead Object with custom button that validates the fields with in Lead and gives a pop up Message if the fields are not populated. Was ...
1
vote
1answer
28 views

Uncaught Reference Error

jScript for (var i = 0; i < {!pLat}.length; i++){ var marker = new google.maps.Marker({ position: new google.maps.LatLng({!pLat}[i], {!pLng}[i]), map: map ...
0
votes
0answers
37 views

Removing a duplicate element from a JSON Array

I'm trying to figure out a way to dedupe JSON arrays based on the _prop.Invoice_Number__c value returned by a Remote Object retrieve. Please see attached screenshot of the JSON as viewed through a ...
0
votes
5answers
37 views

type error : window.open is not a function

I have written a script to open a page in new tab on click of a command button. Unfortunately I get the following error: window.open is not a function() I have not created any variable named ...
0
votes
1answer
57 views

JavaScript or JQuery function in Html editor of rich text editor

I know JavaScript or CSS won't work in the SalesForce HTML editor. But I have tried these: I put JavaScript and HTML both in HTML editor. (JavaScript got deleted automatically and it didn't work.) ...
0
votes
1answer
17 views

Issue creating a list view button in Lead Object which will open new task form

Issue while creating a list view button in Lead Object which will open new task form based lead source is equal to web. Please find the script below. ...
2
votes
1answer
62 views

How to insert a edit command button for output field?

I have a output view page, and i want to insert a edit command button. when user click on edit button it will enable them to type on output field and save. Can anybody tell me how to do that? Thanks ...
2
votes
1answer
34 views

Visualforce component on page - not rerendering after onclick event

I'm attempting to rerender an apex:outputPanel containing a visualforce component. When I click the panel containing the onclick code to call the controller method to change values and rerender, ...
1
vote
1answer
50 views

Reload parent, upon Visualforce child save

I am calling the below VisualForce page from a record: <apex:page controller="SuperDuperSettingController"> <apex:pageMessages /> <apex:form > <apex:pageBlock > ...
2
votes
1answer
31 views

Why does readMetadata() give me incorrect data?

I have a script that uses the metadata API to update the 'New' and 'Edit' action overrides for Account so those actions navigate to a couple of custom VisualForce pages. The script works. I can use ...
0
votes
2answers
32 views

How to mark a checkbox in the related opportunity from a quote button?

I am trying to mark a checkbox via a javascript button, i.e. update it as true. The checkbox is a field (Precisa_Cota_o_Frete__c) in the opportunity, but I want the button to work from the quote ...
0
votes
1answer
31 views

Why does it say my VisualForce page 'does not exist or is not a valid override for action Edit?' It exists and is valid!

I am developing a managed package that has a VisualForce page for configuration. Before I packaged everything up, I made some buttons on the page that the user can click to automatically set their ...
0
votes
0answers
29 views

Custom 'Chatter mention' like functionality in visualforce

Is there any salesforce method or a JavaScript based 'chatter mention' like functionality, where a person can type in the name and accordingly it would display matching users instantly as a dropdown ...
1
vote
0answers
39 views

Custom Collapse/expand functionality in visualforce page [closed]

Can any one help me how to implement custom collapse/expand functionalities in visualforce page.(Using vf components, html,javascript) I have requirement to implement the above functionalities same ...
0
votes
1answer
47 views

JSENCODE - unterminated string literal

I'm trying to use JSENCODE to prevent an un-terminated string literal in the following string: {!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} var ...
0
votes
1answer
14 views

Unable to Save email in the Activity History

I have a custom button to send an email. The code is working fine. Now I would like to insert those email in the activity history. I did set mail.setSaveAsActivity(true). But when I click the ...
1
vote
1answer
24 views

Custom Freeze Button on User Detail

To start, I have already read Bob Buzzard's article, http://bobbuzzard.blogspot.com/2013/11/freezing-users-from-visualforce.html, and incorporated a lot of what he's used. At this point, I am now ...
0
votes
3answers
29 views

Custom Button to send email no working

I did create a custom button(OnClick JavaScript) to send an email. It is working fine with system admin. But when I did deploy it in production the users with profile other than system admin ...
1
vote
1answer
42 views

Is it possible to include js files from static resources into listview onclick JS button?

Is it possible to include js files from static resources into listview onclick JS button? REQUIRESCRIPT can't be used anymore for static resources because of this Known Issue that won't be fixed. The ...
0
votes
0answers
21 views

Update Record Type in Custom Button using Cancel URL

I have a custom button on an opportunity called 'Move to Stage 2'. When this is clicked it opens the opportunity in the Edit page and updates the record type to 'Stage 2' (which also updates the page ...
0
votes
1answer
31 views

Receiving a “Insuffcient Privileges” Error on a Admin account in Dev edition?

Currently trying to build a piece of Visualforce and apex code to display every field from an object as an input field, so that it can be saved as a pre-gened form. I am required to redact part of ...
0
votes
1answer
31 views

Canvas signature capture issue on page scroll

We tried to integrate the multiple signature to VF page, but we have some issue when we scroll the page for signature, the signature part not working properly. Can anyone please help me out in this? ...
1
vote
2answers
29 views

Filter a related list based on a check box from another related list

Is it possible to filter the related list based on a check box from another related list? If so what is the best way to achieve this. The current relationship is all based on custom objects and ...
0
votes
3answers
34 views

Getting “TypeError: Cannot set property 'onclick' of null”

I have a Visualforce error that's driving me crazy. My Javascript file ui.js (see blow) is just defining an onclick event on a DOM element. Here is my javascript : (function (window, document) { ...
3
votes
1answer
153 views

How to call a javascript when a page Rerenders?

I have a javascript function that I want to call whenever I do a page rerender using an apex:actionPoller. How can I best do this?
0
votes
0answers
31 views

Geolocation using Apex

I need to populate the locations dynamically from my apex class. Please suggest how can I do so... <script type="text/javascript" ...
1
vote
0answers
30 views

SlickGrid integration tutorials or alternatives?

After scouring the web for hours I have been unable to find a tutorial that covers how to integrate SlickGrid into Salesforce. So far, I have found a few questions on StackExchange, the developer ...
0
votes
0answers
37 views

Passing Picklist Values to Controller

I found a nice Class which can get all controlling and dependable fields from Org. By giving the method the Selected Value from my Controlling picklist "Specialty" - basically transferring the Value ...
0
votes
0answers
33 views

Error XMLHttpRequest

I have a ORG production where a link open a POPUP code works, but the same code in sandbox does not. Error: In console chrome: Synchronous XMLHttpRequest on the main thread is deprecated because ...