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

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

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
0answers
20 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
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 ...
-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
18 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
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
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
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 ...
-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
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
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
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
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 ...
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
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 ...
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 ...
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=...
-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
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
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
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
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
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. ...
-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....
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 == '' &&...
1
vote
2answers
36 views

Required field validation error message in VF Page using Javascript? (No Alert box or Popup's)

I want simple message 'Complete this field' (as shown in image below) to displayed under input boxes which are empty while submitting the form in VisualForce page. Can someone tell me how to ...
0
votes
1answer
22 views

Is there a way to add particular <div> tags into a pdf on a button click in a vf page using javascript or the apex controller?

I know we can use the renderAs property to get whole vf pages as a pdf but I don't want that. I want particular tags in my pdf. I need a 'view/print pdf' button which opens the pdf in a new tab. I ...
1
vote
2answers
16 views

On click JS function syntax Map marker

I am trying to call a JS function on a button placed in the info window of map marker and pass the SFDC id to it, But the JS is giving me a syntax error. Here's my piece of code- for(var i=0, j=...
0
votes
0answers
13 views

Change landing app in lightning

Use Case: Our org have users coming from 2 sources using SSO. There are some common users between these sources. If user is coming from Source A, lets say landing app after SSO should be "Sales" and ...
0
votes
1answer
34 views

Refresh Component When Attribute Changes

I have a primary component that has an attribute used to render different areas of the page. I click a button that updates the variable and renders the correct section of the page. However, when I ...
0
votes
0answers
21 views

Marketing Cloud SmartCapture javascript validation

I am trying to add field validation with Javascript on a SmartCapture form. The field validation is working, however I get POST 500 (Internal Server Error). For some reason, the post method breaks ...
-1
votes
1answer
33 views

Validate a form with Apex and server side controller

what function can I use when I need to validate a form with Apex on the server side controller? I can't find functions on the internet. This is my code: View: <form class="slds-form--stacked"&...
0
votes
0answers
8 views

How to Add Toggle button and Clone| Add favourite| Delete Action Icons for a every record in records list?

I have a VF page. that page will be showing custom object quote line item records. I need show "Clone| Add favourite| Delete Action Icons" for each record which are displayed in records list view in ...
0
votes
1answer
40 views

Set the value of a radio button with the controller in javascript

I would like to do something simple but I think it is not as simple as I though. I have a form with a radio button field (salutation field in the account) and I would like to auto fill the value when ...
0
votes
1answer
30 views

Custom javascript button error message

I have a custom button and when the button is pressed the following javascript is executed: window.parent.open( "{!URLFOR( $Action.Custom_Object__c.New, null, [ ...
1
vote
1answer
48 views

Lightning Component Error For Case Close Button

Trying to create a Lightning button to close a case and I am getting this error Uncaught Unable to find action 'getCaseStatusPickList' on the controller of c:Button Callback failed: apex://...
0
votes
1answer
37 views

Re-rendering map component on the Onchange event lightning: select

I have a lightning select on my component with two values - Leads and Accounts. When the option leads is selected ,I need to display all the Leads on map and if Accounts is selected then need to ...
1
vote
1answer
24 views

How to click a button from javascript in a lightning component

I am attempting to fire the standard submit event from recordEditForm by clicking a hidden button from javascript but the below code is not working for me any thoughts? I already attempted to use the ...
0
votes
0answers
25 views

Redirect to detail page after saving record using force:navigateToSobject [duplicate]

I am getting error as "This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read property 'setParams' of undefined] Callback failed: apex://...
0
votes
1answer
20 views

Page Refreshing and Resetting Visualforce Parameters

Through a series of events, I have a visualforce component that When a apex:outputLink is clicked calls a component controller method Calls some javascript in the component The javascript calls an ...
0
votes
1answer
25 views

Marketing Cloud Automation Studio Scripty Activity getting time out

We have script activity which is posting (HTTP post) messages to another system. However, Script activity is getting time out after 30 mins as per default timeout setting. Is it possible to override ...