Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

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 the functionality of some of its components.

6
votes
0answers
619 views

'Script Error' in my Lightning Component?

I have a component: <aura:component controller="FileUploadController"> <ltng:require styles="{!join(',', $Resource.DropZone + '/basic.min.css', $...
5
votes
0answers
316 views

Visualforce Remoting: Javascript proxies were not generated for controller QuoteLayout: may not use public remoted methods inside an iframe

I've looked at all of these solutions here on SFDC stack exchange (1) (2) (3). I followed them for what applied to what I'm doing and I'm still getting this error. I made my apex class global ...
5
votes
0answers
251 views

Hitting error when trying to save HTML5 canvas in VisualForce Page

We have a requirement to open an image attachment in a VisualForce page, the user should be able to draw on the image and those edits should be updated in the attachment on save. So to achieve this, ...
5
votes
0answers
544 views

'orientationchange' doesn't seem to be working in S1

Recently started using S1. Developing a web app and trying to listen out for orientation change on iPad. This works perfectly in full site mode on the iPad function doOnOrientationChange() { ...
4
votes
0answers
208 views

How to parse the matrix report data in to apex controller to show it in chart?

I am trying to pass the matrix type report into a google chart, but for that i need to parse the data.i have tried to do that but i didn't get any matrix grouping function since i am new to report ...
4
votes
0answers
514 views

Add custom Javascript <script> tags to Napili and Lightning communities after Summer 17 release

After Summer 17 release the LockerService will disable Javascript tags in the community Header Markup and access to DOM from Lightning Components. If I would like to add a custom Javascript to Napili ...
4
votes
0answers
320 views

Uncaught TypeError: r[o].hasOwnProperty is not a function when trying to use a Static Resource

I'm currently working on a Lightning Component that needs a third party library when the library is loaded I get this error Uncaught TypeError: r[o].hasOwnProperty is not a function throws at /...
4
votes
0answers
89 views

Service Console errors in javascript console

one of our customers is getting some errors in their DevTools Console after using the Service Console for certain period of time and I believe those errors are causing the DOM to break and cause ...
4
votes
0answers
35 views

Is there any way to refresh dashboards on load as of Spring 16 release?

Is there any way to refresh dynamic dashboards on page load anymore? We used to be able to put in JS that "clicked" the refresh button for our users but that appears to be defunct as of Spring '16.
4
votes
0answers
330 views

Does anyone know a good snippet collection for APEX, Lightning and SF-specific JS?

I'm improving our free IDE CodeFusion and just added configurable snippet support in the new version. Internally we are using ACE Editor. Now technically I'm already done and it works like a charm. ...
4
votes
0answers
489 views

How to load Chatter with Javascript

Question How can I load chatter (chatter:feedWithFollowers) dynamically (using javascript) in the browser? Motivation I'm working on a Visualforce page that should load as fast as possible and the ...
4
votes
0answers
328 views

OpenCTI Screen Pop only when window is in focus

We have an in-house OpenCTI adapter that we use with salesforce. It's primary responsibility is to find associated records and pop the results when a new call comes in. We have a tendency to have ...
4
votes
0answers
74 views

Including javascript in the top level window of Service Cloud

I'm working on an integration project that requires showing the Service Cloud from a .NET control. That control generally communicates via a javascript object on the top level window. The problem I'm ...
3
votes
0answers
82 views

getReference databinding for maps

seems I have found a bug which prevents data binding in case of arrayed Maps. Maybe you can help me how to get around this. I have a list of Custom Objects, I iterate over. Each of the components, I ...
3
votes
0answers
124 views

Help on enableClickToDial in visualforce

I am using Open Cti in a visualforce page and the page is pinned in utility bar in LEX. Now on click of a button, we are invoking enableClickToDial with a simple callback. Howver the ...
3
votes
0answers
150 views

Cannot read property 'appendChild' of undefined

I want to show the geoposition on a leaflet map lightning component. I enter an Id and get geolocation data accordingly. When I first enter an Id everything works fine, for the second time it shows ...
3
votes
0answers
30 views

How to validate the specific record when field is empty based upon specific record value in apex:repeat tag?

How can I validate the specific record when field is empty based upon specific record value in apex:repeat tag? For example, I have displayed 10 account input records with four fields in page. In ...
3
votes
0answers
455 views

Displaying PDF content in new tab using ui:outputURL not working by clicking, But working by “Open link in new tab”

I have been trying to display PDF content in a new tab using ui:outputURL. It's not working by clicking, but working by "Open link in new tab". Component: <aura:application extends="force:slds" ...
3
votes
0answers
143 views

Implementing FusionChart.js in Lightning Component(Locker Service)

I want to implement fusionchart.js in lightning component. I have implemented it in visualforce page using fusionchart CDN. As we cannot use CDN in lightning component due to locker service, I ...
3
votes
0answers
467 views

URL.createObjectURL not working in lightning

This might relate to LockerService(Link). I try to use URL.createObjectURL on a vf page. Works fine in classic but in lightning it will give me "This page isn't available in Salesforce Lightning ...
3
votes
0answers
2k views

download the salesforce lightning component content into a pdf

I have an issue in salesforce lightning that how can I convert the following Salesforce lightning component into PDF. We have working on something that we are able to convert the HTML page into PDF ...
3
votes
0answers
113 views

Ajax REST Tooling Queries Return Null SymbolTable?

Background I'm trying to build upon Daniel Peter's approach in his HyperBatch library to build a HyperQuery tool that will allow me to get better insight into some large tables we have without ...
3
votes
0answers
217 views

Using Zapier Activity within Journey Builder

I´m triying to create a Zapier's custom activity within Journey Builder, but I´m having problems to show it in SFMC, pulling me the followin error: "One or more custom activities failed to load. ...
3
votes
0answers
538 views

Dynamic Custom Label in Javascript

Is it possible to retrieve custom labels dynamically in javascript? Works well: var labelTest = '{!JSENCODE($Label.MY_LABEL)}'; I need to do something like this: var text = 'MY_LABEL'; var ...
3
votes
0answers
207 views

component.set() on Array not reflecting changes in view

We have section in the app, which allows user to create/edit/remove option under a question, which will be displayed in Assessment. I'm able to do following: Add new option Edit the option Delete ...
3
votes
0answers
180 views

Visualforce page is throwing error on Chrome for Spring 17 release

For a sandbox which has been upgraded with Spring 17 release, I am getting error (screenshot of the error message is mentioned below) from a Visualforce page which is embedded in the standard page ...
3
votes
0answers
1k views

ui:inputCheckbox and aura:iteration: value binding

I am currently writing a lightning component made of a table of elements that can be selected (or not) using a ui:inputCheckbox. So the way I do is fetching the data from APEX controller during the ...
3
votes
0answers
336 views

Using onclick and ontouchend events in Lightning Components

I was going through the Lightning Componenet Developer Guide. I noted an interesting point which suggests not to use the onclick and the ontouchend events in the components under Events Anti-Patterns. ...
3
votes
0answers
501 views

How to make table align correctly Salesforce Lightning design system Javascript Table

I was able to append my data, and now the data does not align correctly with the column headers as well as it is not sortable (in the code I have sortable enabled. and the check boxes do not align ...
3
votes
0answers
32 views

Google Charts works in Preview but does not work in Force.com Site

I am using Google Charts to display some data from a custom Object, it displays the data when previewed, but when I access it from a Force.com site I cannot view the chart. Additionally when I use a ...
3
votes
0answers
354 views

jqGrid issue after enabling lockerservice

We have a lightning component that uses jQuery2.2.4 and jqGrid 5.1.1. After enabling lockerservice this component stopped working. We have come up with a simple test case to reproduce the error. App ...
3
votes
0answers
83 views

View all console events

I'm new to Salesforce. I have a CTI integration that needs to fire some events via sforce.console.fireEvent. Is there a tool or some setting I can turn up in the developer console to observe the ...
3
votes
0answers
245 views

How to get the Referrer in SF One

I have a bit of a pickle. I have overloaded my custom object's view page with a VF page. This means that it can be invoked, using native functionality, from all kinds of places (search, related lists, ...
3
votes
0answers
849 views

oncomplete not working in visualforce page

I am trying to build a visualforce page which can work in salesforce and also salesforce1. I am trying to redirect after the action is completed it work just fine when i try it from desktop but from ...
3
votes
0answers
130 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 ...
3
votes
0answers
708 views

Javascript custom button stopped working, Synchronous XMLHttpRequest is deprecated

We have a custom javascript button on the quotes object in our org that has been working for several months that someone has noticed today is not working. I'm not sure if there was an update that ...
3
votes
0answers
912 views

Problems authenticating using JSForce

so I've been trying to use JSForce to authenticate into SF. I used both the first example with SOAP API login and the second one with OAuth2: https://jsforce.github.io/document/#connection However, I ...
3
votes
0answers
116 views

I can't patch a salesforce object using angular and REST api

I'm trying to patch a salesforce object using angular, but am getting no where. Every time I get a nondescript error. salesforce.patch = function(resource, contentType, data) { var http = angular....
3
votes
0answers
530 views

How can decompress gzip file in salesforce

I am doing SF integration With Power Bill. In the response i am getting a gzip file with encoding-format: application/x-gzip. I want to decompress this file into Sf but not able to find any solution. ...
3
votes
0answers
247 views

AJAX Toolkit execute Apex method with inner classes

I have a Visualforce Page where I use the AJAX Toolkit to execute Apex methods. In my Apex Class I have this POC method: WebService static ParametersWrapper testWebserviceMethod(ParametersWrapper ...
3
votes
0answers
564 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 ...
3
votes
0answers
409 views

Is it possible to include a Mustache.js Template saved to a Static Resource within a VisualForce Page?

My VisualForce page includes the following Mustache.js template code: <script id="template" type="x-tmpl-mustache"> <tr><td>{{LastName}}</td><td>{{FirstName}}</td&...
3
votes
0answers
1k views

How to refresh record when user presses Cancel button in Salesforce1?

I'm writing a visualforce page as a custom object action for Salesforce1 app accessed on user's mobile devices (e.g. iPhone) and need to refresh the detail screen when the user clicks the Cancel ...
3
votes
0answers
897 views

Ajax Toolkit remoteFunction Returns Timeout and Page not Found errors

I have a Visualforce web page, version 30, that contains a table of Salesforce data and two iframes. The Salesforce page itself uses the HTTPS protocol. The source of the first iframe is a non-...
3
votes
0answers
237 views

smartsync offline query

I have a backbone collection model like this: // The TaskCollection Model app.models.TaskCollection = Force.SObjectCollection.extend({ model: app.models.Task, fieldlist: ["Id", "Subject", "Status", "...
3
votes
0answers
295 views

Load VF login form data on startup

I have VF Login page for portal user where I am trying to save few fields which includes inputtext and picklist so when user close the browser and come back again then the same information appear back ...
3
votes
0answers
2k views

Hierarchical tree view in VF with custom object

I have a custom object that shows a relationship between a contact or account with another contact or account. I would like to display these custom objects in a hierarchical tree display. My VF page ...
3
votes
0answers
546 views

Trigger a native change event from within a Visualforce component

I am using the following Visualforce multi-select picklist component (thanks @metadaddy!) and extending it to handle an 'onchange' attribute: https://github.com/metadaddy-sfdc/Visualforce-Multiselect-...
3
votes
0answers
438 views

Method to determine if object loaded not using URL

I have a button in a custom sidebar object that creates a task when clicked. If an object is being viewed the task should be related to that object. If an object is not being viewed (your are on a ...
3
votes
0answers
2k views

XLS Read and Automatic CSV conversion

We have a requirement to read contents (rows) from an XLS file and upload (the file as an attachment) the same once the read and insert into custom Objects are complete. My observation after ...