Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

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

Uncaught Error in $A.getCallback() [Cannot read property 'config' of undefined]

I have a lightning component which displays a list of records through response from server side controller and has filter and search button. The list of record has a button adjacent to each record, ...
0
votes
1answer
519 views

How to get Controller variable into Javascript alert();

I have a Controller method savetask(). It is called from javascript where I am inserting task after insertion I am getting that Taskid into String variable and I have to show this variable into alert()...
0
votes
0answers
19 views

Help regarding passing record id in Custom Button with List View

I am creating a custom button with List View and would like to add it to the related list of Contact. I am looking to have the external url as the redirect with parameter as id related to the Contact ...
0
votes
0answers
16 views

Javascript If-Statement Check to see if a certain button has been clicked [on hold]

I am trying to use an if statement in my application in Javascript that sets a text string to a certain phrase when a certain button is clicked. There are four parts in my if statement, and it sets ...
0
votes
2answers
25 views

Show message and grey out button in lightning component

I have a component and I want to show a message and grey out the button if some fields are not filled, how to do this? Component: <aura:component controller="purchaseOrderComponentController" ...
0
votes
1answer
25 views

How to refresh a standard page using remote action in vf page?

I need to trigger a controller action once user loading the standard account page. So that I have created a custom vf page with zero height and embedded it in the account page layout in order to call ...
0
votes
1answer
491 views

Get current object record values in onload javascript visualforce page , its a custom button

We are replacing all the javascrip buttons with visualforce pages, however popup error messages cannot be achieved from this vf page buttons, which javascrip can easily do. I trying the below ...
-1
votes
0answers
21 views

I would like to add a delete button on the record detail page of the Campaign Record or the list view

I am trying to make this button so that portal users will have the ability to delete campaigns they are creating as tests or decide they do not need. From my research, others seem to have done similar ...
1
vote
0answers
15 views

Alternative to lightning:overlayLibrary in LightningOut

I have a Visualforce page which loads a Lightning Aura Component using LightningOut. The Lightning component uses a <lightning:overlayLibrary component, which is not supported in LightningOut. ...
0
votes
1answer
17 views

Error in $A.getCallback() [Cannot read property 'fire' of undefined] failed: $A.get('e.force:refreshView').fire();

Background I have a Visualforce page which loads a Lightning Aura Component using LightningOut. When the Lightning component executes this line: $A.get('e.force:refreshView').fire(); I get this ...
0
votes
0answers
15 views

Is there a way to create a custom toast instead of a javascript alert on a visualforce page? [duplicate]

What I require is that when I select a value from a picklist I need a toast that has a message for the user. I have already achieved this through the js alert but that wasn't that difficult. But I don'...
0
votes
1answer
25 views

Compare fields in lightning component

I have a lightning component which the goal of it is to open a page if some fields on the record are not null, how to compare those fields to null? Here the component: <aura:component controller="...
-2
votes
1answer
38 views

How to call one method after another in wrapper class? [on hold]

I Have a lookup based on that value selected i have to query and get the select options. I am trying to call the wrapper class but its throwing me null pointer error.guide me where i am going wrong. ...
-1
votes
1answer
32 views

How to rerender specific row independently for picklist values

I want to render picklist values based on each row when lookup is selected. There is a filter where it checks the recordtype of the lookup and based on it picklist value will be displayed. The problem ...
0
votes
1answer
26 views

How to currentdate.getDate() in JavaScript for Lightning Web Component?

I'm trying to write a test class to automate my several tests in register forms, but the JavaScript currentdate.getDate() isn't working for some reason that I don't know. I'm trying the following: ...
0
votes
1answer
24 views

Can we blink a primary tab after opening it via any css or js?

I am trying to open a primary via this: sforce.console.openPrimaryTab(null, '/lightning/n/***', true, 'TestSearch', openSuccess, 'salesforceTab'); Now if I pass false, the tab opens and does not ...
2
votes
1answer
524 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 ...
-1
votes
2answers
30 views

Disclaimer Popup on Chatter Group [on hold]

I want to add a disclaimer message on a chatter group. When new user join chatter group he/she needs to accept disclaimer message. Can anybody help me on this because there is no standard way to do ...
0
votes
0answers
13 views

Multiple recordEditForm forms field value check

I have a requirement that must replace the functionality of a third-party software in which a list of opportunity team member roles must all be assigned in a single screen. To accomplish this, I have ...
0
votes
2answers
32 views

Second apex method executing before the first one finishes

I have a vf page displaying several Multi select custom buttons. And I am calling a apex method every time one of the button is clicked from VF page using actionfunction. But if I click 2 buttons in ...
0
votes
0answers
17 views

how to conditionally render a gauge chart based on values of a numeric array in Visualforce

controller--snippet if(pos >=0 && pos <assTElist.size()){ lstTrans = [select Maturity_Assessment_Question_ID__r.Transformation_Element__c fa, ...
4
votes
1answer
445 views

How to add a functionality to stop copy paste on an input field in lightning?

I'm making a form that includes two fields, Email and Re-Enter Email. I don't want the user to copy and paste the email id in the second field. I have to prevent right clicks on the re-enter field and/...
0
votes
1answer
581 views

Onclick JS not working

The code snippet below is part of the script I created for an on-click event and should display the alert message if the conditions were evaluated true. } else if (BU == "Talent" && Type == "...
0
votes
0answers
9 views

Filetype error in community, only happening in sandbox but not in Production

I am receiving below error when I am trying to upload a .FNM file in my community. No code has been changed but it is working in Production with same code but not in sandboxes, does this have ...
0
votes
0answers
17 views

lightning:input press enter and hide mobile keyboard

I have a <lightning:input which is used to search for products. CMP <lightning:input onchange="{!c.handleSearchTermChange}" aura:id="searchTerm" label="Search Products" type="search" /> ...
0
votes
2answers
537 views

Capture JS variable with AMPscript/SSJS

I have a script with moment js library running in a landing page and the purpose of the library is to check whether today falls in Daylight Saver. If it does then the function sends a true statement ...
0
votes
2answers
38 views

CPQ Javascript Quote Calculator Plugin Custom Script not updating

I set up a simple CPQ Javascript Quote Calculator Plugin Custom Script last week and it was working fine. Today, I wanted to update the script, but my changes don't seem to take effect. My (...
0
votes
1answer
119 views

Using Google translate APIs in Lightning components

How can we translate all the contents in a lightning component to the User's native language (not just by using labels) ? Is it possible by using google translate APIs if we can get the current user'...
0
votes
2answers
36 views

how to access object values in lightning component

I want to render a table dynamically in lightning. I have a list of data of transaction (Custom object) and list of string which contains API name which data i want to render. I have created a child ...
0
votes
2answers
524 views

Rerendering a table row for each selected javascript checkbox

I am trying to display an empty table row (for Object2__c) each time I select a row (for Object1__c) using a javascript checkbox. There's no error but nothing happens every time I tick a checkbox ...
1
vote
0answers
34 views

Send data from Lightning component to visualforce page without window.postmessage

I am using window.postmessage() to send data from lightning component to visualforce page as given in below link. https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-...
0
votes
0answers
17 views

Dependant picklist in VF Page with or without using apex controller [duplicate]

I have a custom object and it has two picklists. One of them is dependant on the other. I'm supposed to put these on a vf page. The issue I'm having is that the values of the secondary picklist are ...
0
votes
1answer
563 views

Control Dependent checkbox in VF Page using javascript

I have a dataTable with 2 checkboxes namely Master and Child. Code is as below (should work on all dev orgs): VF Page: <apex:page controller="multipleCheckbox"> <script> ...
1
vote
1answer
32 views

Product: You can't view this item in Lightning Experience (Salesforce1 / Mobile)

I have a custom list of Products which appear in Salesforce in both mobile and desktop. When the user clicks on the button in the list: <lightning:button label="{!r.Name}" value="{!r.Id}" onclick=...
0
votes
1answer
46 views

list view button show/populate account name

when click on the new contact button (this is list view javascript custom button) page redirected but account name not populated automatically var qc = sforce.connection.query("SELECT Id FROM ...
1
vote
2answers
2k views

How to pass multiple parameter in URLFOR in Custom Button JavaScript?

var iframe_url = '{!URLFOR("apex/dummy_VFP?id="+ customObject__c.Id)}'; The above one is working perfectly, but when I tried to pass one extra parameter its giving up syntax error, below I tried: ...
-2
votes
1answer
23 views

Import docx.js library [closed]

How would I use a NPM library such as docx in salesforce? The folder hierarchy seems large to upload as a static resource. Please advise
0
votes
1answer
19 views

Make tab Enable/ Disabled

In the Vf page where I created a tab. I want to make enable or disable if the checkbox is true.but my code is not working here is my code: <li class="slds-tabs_scoped__item tabs_scoped-li-2" ...
0
votes
1answer
552 views

Modal Pop-Up from Visualforce Page Included in Standard Detail Page Section

I have a Standard record detail page in which there are sections which include visualforce pages. I'm rewriting these using SLDS to look like lightning. From one VF page I'd like to open a modal which ...
0
votes
1answer
27 views

How to close window automatically once the excel file got downloaded?

I have command button while clicking the button it will redirect to VF page where it will renderas data as excel also it will open a site.Once the excel download is completed,the window needs to be ...
0
votes
0answers
30 views

Vue datatable horizontal scroll event unfix table headers [closed]

I have a requirement to fix vue datatable table headers on vertical scroll and unfix the same while horizontal scroll in a Visualforce Page Currently, using floattable plugin, I am able to fix ...
0
votes
1answer
554 views

DocuSign JavaScrip Button - Hard Code User /Contact

I am using DocuSign on quotes that should create an envelope and add Contact user (associated with Quote record) and a static user (or contact) 'John wilson'. Ie. Signer 1 should be contact on record ...
0
votes
0answers
25 views

Trying to extract data from an object [closed]

Maybe a silly question, I am trying to extract the values of an object, for some reason I get errors. In the below picture I am trying to get the value of sumchans__totalUnits__c. The value below is ...
0
votes
2answers
569 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 ...
0
votes
0answers
40 views

Javascript issue due to spring 19 release

Facing one javascript error (reportFailedAction) after spring 19 on Salesforce community. This error stops navigation between different pages within the community and sometimes occurs on button click. ...
1
vote
1answer
561 views

Click to dial not working with lightning page

I am using CTI click to dial functionality in lightning. For this i am using enableClickToDialand onClickToDial functions. enableClickToDial working fine but when i clicked on number a javascript ...
-2
votes
0answers
41 views

Javascript Blur() not working in VF Page

I want to blur an element on Window scroll Up event.. I am doing so using following Javascript window.onscroll = function() { document.getElementById('HtmlIdGenerated').blur(); document....
3
votes
2answers
563 views

Pulling records by parent ID with visualforce SLDS remote objects

I'm trying to pull fields in my custom object by matching it with the parent Id in Visualforce with the new Lightning design. I've done it with Apex but am a little confused with remote objects. I ...
0
votes
2answers
610 views

Lightning component quick action - redirect from Contact to User record detail page

I would like to know how to how redirect from Contact to related User record page via Lightning component quick action. Currently I have created Component which gets Contact record Id and passes it to ...
1
vote
1answer
33 views

Optimize code by reducing many If-else Conditions?

If-else code which I have written. I want to optimize it. (Using maybe Collection). Can someone show me how to do it? if(form.first_name.value == '' && form.last_name.value == '' &&...