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.

0
votes
0answers
7 views

Open Snap-In chat window on click of button

I have a custom button on click of which I need to open Snap-In window in my website. But I'm not sure which function to call to open the Snap IN window. <button type="button" onclick="initESW('...
0
votes
0answers
11 views

How to close the visual-force page opened as an iframe in the lighting view

I am calling a visualforce page on click of a button (URL type) as displayed below: On click of a button below page is opened. Now I am not able to Close this page to go back to the record page. I ...
0
votes
1answer
45 views

OpenSubTab in Service console app

I am trying openSubTab on a service console application when user click on the member name. When I do so it giving error which i am not sure what I am doing wrong here. Could you please shed some ...
0
votes
1answer
32 views

How to use Array.map() in Lightning Component JS File

I was going through this blog to understand foreach loop, but the blog says that use of Array.map() is more efficient than for foreach. So, I tried implementing that in my Lightning Component, but it ...
1
vote
0answers
22 views

Access apex variables from non visualforce markup

I want to execute some javascript in a Visualforce page: function newWasteAssessment(){ var siteid = '{!siteID}'; console.log('new waste assess: '+siteid); if(sforce....
1
vote
1answer
25 views

How to get custom field returned by Platform Event in Lightning Aura Component

I haven't been able to figure out how to access a Custom Field on a Platform Event within an Aura Component js callback handler, does anyone know how I can do this, or where it exists in the ...
1
vote
1answer
23 views

Unable to use variable of javascript remote method variable in chart.js code. It is coming as undefined

I have to use list of accounts as labels in my chart. In order to fetch list of records I have used js remoting. I am able to fetch but not use within chart.js labels. Here goes my vfp :- <...
1
vote
2answers
33 views

“Cannot destructure property” on LWC

I'm attempting to create a component that gets the current record's Id and queries related records that contain a Geolocation field, so I can populate a map. While developing this, I created a method ...
0
votes
0answers
22 views

Javascript on rerendered outputpanel not working in production

I am using an action function to rerender an output panel in my visualforce page after i fetch some data from the controller, and then i manipulate it with some javascript (also inside the same output ...
0
votes
2answers
40 views

Dynamically set columns on pageBlocksection and pageBlockSectionItem?

Page : <apex:page id="ContactDetails" extensions="ContactsController" standardController="Case"> <script> function showFieldsOnClickAction() { showFieldsAction();...
1
vote
1answer
30 views

Unable to setup custom javascript detail page button

I am working on detail javascript button in the lead object. But now I am facing the below issue. Javascript code: {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/24.0/...
0
votes
0answers
18 views

Copying fields data when checkbox is checked in multiple rows(Visualforce Page)

I have challenge I'm working on a visualforce page I want whenever the checkbox is checked I want to copy the values into input text fields in visualforce page. So here I have multiple rows and ...
1
vote
1answer
71 views

Unable to get values of selected elements in lwc js controller [on hold]

I'm developing a Lightning Web Component, which has the add & delete row functionality. Each row contains 1 input text & 2 picklists. I want to capture the value of all the rows i.e input ...
-1
votes
0answers
28 views

Not Accepting related Datatypes values

Hi I am building Custom filter logic by using Lightning component.I have created apex class,JS file and lightning component for this. But The problem is field value is accepting only string value. ...
0
votes
0answers
17 views

How to validate the <apex:inputfields> on form submission and show error using SLDS?

I am using SLDS in a VF Page and I am referring to this link here to show error. The problem is the error is displayed on page load because I am not removing the Slds-has-error class. But, how do I ...
0
votes
1answer
28 views

How to get value of input from lightning js controller without an id

I am creating the form using: <lightning:recordForm aura:id="data-export-form" objectApiName="{!v.sObjectName}" fields="Account__c" columns="1" mode="edit" onsubmit="{!c....
0
votes
1answer
16 views

How to edit a specific row/index in aura iteration by javascript?

Hi I am trying to edit a specific row in an iteration based on an onchange event. One of my columns in my iteration is a picklist. And depending on what is selected I want the rest of the columns in ...
0
votes
1answer
22 views

Uncaught Error: Mismatched anonymous define() module. When using RequireJS in a Visualforce page

Background RequireJS is a dependancy for another package I want to use in a Visualforce page. I have uploaded RequireJS as a static resource. <apex:page showHeader="false" standardStylesheets="...
1
vote
0answers
20 views

How to print iframe in Lightning Component

I have a Lightning component which has an iframe to a visualforce page: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId"> <iframe aura:id="myFrame" ...
0
votes
0answers
25 views

Interacting with external calendar library in my Lightning component

I am implementing FullCalendar in a lightning component and am having trouble interacting with it from my methods. When I click on the Previous button, the console log appears but doesn't navigate to ...
0
votes
1answer
26 views

Add Visualforce Page that is just a Button to the Custom Buttons Section of Page Layout

I had a custom button that used OnClick JavaScript behavior and when it was clicked would execute a bunch of JavaScript which would ultimately build a url and open it in a new window for the user. ...
-1
votes
0answers
20 views

Scan Barcode from computer webcam and mobile camera [duplicate]

I want to know if there are any html5 and javascript api available to scan barcode from camera. I do not want to build a native app. The web app should be able to open pc camera and scan barcode ...
0
votes
2answers
59 views

Lightning components parameters passing

can we pass parameters like json objects,json,strings, integers among helper methods in lightning components? I am trying to pass ( Helper1:function(){ Var Parameter1s = jsonobject; ...
0
votes
2answers
19 views

Need to get the key of an Object Array given a Value

I have a registration process that differs from each record type, I need to get the recordType Name (or label in this case) so I can give proper flow to each user. The record type selection is made ...
0
votes
1answer
10 views

Trigger change in PickList4.js from Salesforce

How can I trigger a picklist change event inside salesforce: We have the following code : <apex:outputPanel id="dynamicRerender"> <apex:repeat value="{!strings}" var="...
0
votes
0answers
7 views

Salesforce 1 - Capture Location

I've come across a requirement where User's location needs to be captured at every 1 minute (Without any user intervention). Application - Salesforce1 Is there any way by which we can achieve this? ...
0
votes
1answer
16 views

How Do I Use The “oncomplete” Function To Refresh A Different Visualforce Page?

Is it possible to update a different visualforce page using the "oncomplete" function? I have a visualforce page that I would like to have the ability to refresh various other Visualforce pages when ...
0
votes
0answers
14 views

Dependent picklist not working when rendered in output panel of VisualForce Page

This is a small snippet of a bigger scenario. Here I have an empty div where I dump the full div section of the reRendered output panel. I am doing this so, because in my main codebase we have a ...
0
votes
1answer
35 views

Use force:navigateToURL to open new window instead of new tab

When I use force:navigateToURL, it opens the URL in a new tab. Is there anyway to force this to open in a new browser window instead? Thanks in advance, code pictured below var urlEvent = $A.get("e....
1
vote
1answer
18 views

Open Html file from Heroku Bash

I have deployed my Flask python application on Heroku. The problem is that in one line of my python code I must open an HTML file (where some javascript gets executed). Obviously, it locally works in ...
0
votes
0answers
17 views

How to stream the barcode using input type file with out click capture button [duplicate]

How to stream the barcode using input type file with out click capture button. my requirement is Need to stream the barcode and get the barcode value with out clicking capturing button.once input file ...
0
votes
0answers
16 views

How to auto scan Barcode in SF1 app without clicking image [duplicate]

We have a requirement to decode Barcode of Product in salesforce1 camera and store the decoded barcode value in a custom field on Product. where I want to auto scan Barcode from SF1 App camera ...
0
votes
0answers
14 views

Javascript Code on Order Object in Create Order Custom Button

I want to override Standard Button with Custom Functionality. When user clicks Create Order button it should check for its related Quote's Quote lines product name which contains QSM then it should ...
0
votes
1answer
21 views

Window.local message should be retained even if the window is maximized

In the softphone layout for the CTI integration I am sending the data from visualforce page to other page by using window.local storage. I am able to send the data. But the layout has a maximize ...
0
votes
0answers
50 views

Invalid mutation : [Object Object] is read-only [duplicate]

I am working on building an LWC component for a requirement. I would like to find a way to change/update the properties of an JavaScript Array that contains objects returned from Apex Controller. I ...
0
votes
0answers
19 views

Passing Javascript Array to Apex Controller always results in null values [duplicate]

I have a Visualforce page where I want to pass a javascript array in Visualforce to my Apex Controller. However the values are always null in my List in Apex. I have a commandButton that fires ...
1
vote
2answers
44 views

How to use “jsforce” in an external HTML client for streaming api?

I am trying to use streaming API feature of salesforce, and be able to subscribe to the topic in an external client which is HTML based. My code is below: <html> <head> <...
0
votes
1answer
13 views

The “Where is this used?” feature, does it actually work, well at least for list buttons?

I'm going through the JS buttons to convert to lightning. The list buttons... when going through them it doesn't say they're on a page layout when you click on "where is this used"...at least for 90% ...
0
votes
0answers
52 views

refreshApex in LWC not working outside of Apex method call promise?

In my LWC I have: wiredResults; @wire(getSObjectsForTable, {stepId: '$stepId', objectApiName: '$objectName'}) getSObjectsForTable(result){ this.wiredResults = result; if(result.data){ ...
0
votes
1answer
33 views

How to capture the barcode using camera stream in visualforce page?

How to capture the barcode using camera stream in visualforce page? My requirement is, from visualforce page we need to open a camera in mobile device and i will show the barcode. with out capturing ...
0
votes
0answers
15 views

Resize the Scrolling Div dynamically base on Content from the Server

I have a Div with input text and scrolling, which a click on that input, will bring accounts from the server using action function and allow the user to search for his account dynamically. Until that ...
0
votes
1answer
35 views

How do I show a tooltip on hovering over a star rating lightning component?

I have this star rating lightning component. I need to show a tooltip that shows the number of the star that the cursor is on and not the rating that is selected. I know I can get the value of rating ...
0
votes
1answer
10 views

Static resource not able to access global merged fields

{!$Component.idPageTestCase.idForm.idFocusedTab} This works well when it is there in Javascript tag inside visualforce page, but fails when the Javascript is moved to a static resource and the static ...
0
votes
0answers
11 views

Call a class from a button in lightning

I have the following button the calls an apex class to create records on a related object. What is the most direct way to do this in lightning so it calls the apex class and opens the visualforce page?...
2
votes
1answer
51 views

Lighning Web Components : Passing Javascript string var to HTML href tag

I am trying to bind static url with parameters from Javascript and its not working. Tried several variants <lightning-tile label={option.label} href="https://www.google.com/search?q={option.label}"...
0
votes
1answer
21 views

calling to the server with actionfunction and settimeout

I have a search input on VF page which every character that printed on the keyboard will show the closest result, using actionFunction. for example : If I printed "uni" all accounts that they names ...
2
votes
1answer
73 views

Is it possible to fire an event from a LWC and handle in another LWC which is not in containment hierarchy?

Is it possible to fire an event from a lightning web component and handle in another lightning web component which is not in containment hierarchy? This is achievable in Aura component using ...
0
votes
0answers
8 views

How to open different new sub tabs when the links opened using sforce.console.openSubtab();

I have a custom email section under case, we have written the custom vf page with sforce.console.openSubtab(); to open the link in new sub tab from console. Now, at a time we can open only one sub ...
-2
votes
1answer
18 views

invalid left hand assignment error? [closed]

function showNumber(number) { console.log(number) var earlierVal = document.getElementById("calculatorPanel").innerText document.getElementById("calculatorPanel").innerText = earlierVal + number;...
0
votes
1answer
19 views

Index is not working IE11

When i used to get object from form.querySelector('[name="' + fieldName[i] + '"]' it working fine but if i used form.querySelector('[name="' + fieldName[i] + '"]')[index]) that added Index ...