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.

2
votes
1answer
541 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 ...
0
votes
1answer
640 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 ...
4
votes
1answer
9k views

Redirect to Visualforce page from lightning component

In classic, I have a Custom button for DocuSign which looks like this. I want to convert this to lightning. {!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} //********* Option Declarations (Do ...
0
votes
2answers
45 views

Set picklist field on object using Lightning Data Service

I have a field, Region__c, on my Case object that is a picklist. I am trying to set this field in JS using Lightning Data Service. When using component, set it doesn't seem to be sticking. Any ideas ...
0
votes
1answer
20 views

campinglistformcontroller.js can't insert form in database trailhead

I'm stuck at the last component Aura challenge, I managed the challenge but when I try to insert a form in the database it makes me mistakes. I tested with two submitform function ...
0
votes
0answers
20 views

Javascript Regex to validate Salesforce Lightning domain

To secure an iFrame integration from a Lightning component which communicate via postMessage() with another domain (that i own), i'd like to verify that the origin of the parent window (Salesforce) is ...
0
votes
1answer
23 views

how to limit the data to be displayed from the long text area field in the visual force page?

We have developed a custome emails section through custom vf page. Need to display the sub string of text body from the email message object. Below is the custome email section we have developed : ...
0
votes
0answers
15 views

How to enable right click open new tab option along with the feature of left click that opens in same tab in visual force page

We have a custome emails section where we can open the email message if we click on the email subject. Below VF code we are using to achieve this. <apex:column headerValue="Subject"> <a ...
0
votes
1answer
48 views

Is it possible to call an intranet or local server using a lightning component?

For example, if a local server outputs a JSON with sensitive information, and I can access it through my local network, can I access this data using a lightning component?
1
vote
2answers
71 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> <...
-1
votes
0answers
22 views

How to call visual force page from lightning Component | In Lightning Community [on hold]

/i have lightning component in which there are two button on it 'I agree','Print' and i have made visual force page name 'printTctext.vfp' too, all i want is two open this printTctext.vfp visualforce ...
0
votes
1answer
52 views

how to display first letter of first and last name of profile user within a icon | Lightning Component [closed]

For eg:- my name is hitesh rayal and want to display it in the same way as they have done in the below screenshot get profile user first letter of first name and last name and display it in a icon ...
0
votes
2answers
968 views

lightning:input time display

I am using a <lightning:input type="time"/> component and the picker is displayed to the user in 12 hour time with an AM/PM picker. I want to display this value to the user in a table and the ...
0
votes
0answers
21 views

VF phone number display format

I would like to do one input text of phone number with bottom border only and the phone is separated into two parts: area code + number on the next format : XXX-XXXXXXX Within one input. It's mean ...
1
vote
2answers
41 views

How to add an onchange event to a <input type=“file”

I am unable to get a <lightning:fileUpload> to work on a public community page, so I need to write a custom upload component. I want to fire an onchange event after the user selects a file ...
0
votes
1answer
586 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
2answers
1k views

Opening in a new window from visualforce page opens a blank window?

I am trying to open standard page from a custom Visualforce Page through javascript using command button.But it reacts differently each time.It works properly sometimes.But in some cases it opens a ...
1
vote
0answers
10 views

Multiple filters for same field in wave:update

I'm developing a Salesforce Aura component that updates an existing Wave Analytics dashboard whenever something changes within the component. Those changes may affect same field with several values ...
0
votes
1answer
24 views

How do I create a single Instance of an object and upload multiple attachments for that object in lightning?

When I'm uploading an attachment every time, on Clicking of the Save button which calls the function using javascript in Lightning Component, it creates an Instance of an Object whose ParentId I'm ...
0
votes
0answers
11 views

IE 11 width not working [closed]

if(document.myform.tmpOfficeSelect.value == '0') { new_row.insertCell(1).insertAdjacentHTML("AfterBegin",'Specified onlyIncl. branches'); } else { new_row.insertCell(1)....
0
votes
2answers
853 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
1k views

Clear Multi Picklist Value using JQuery

I want to clear multi picklist value when it is disabled. I'm using like this but it's not working. <apex:page standardController="Contact"> <script src="//ajax.googleapis.com/ajax/libs/...
-2
votes
1answer
28 views

Show modal on vf page load [closed]

I need to show a modal after a vf page loads: the modal must be a confirm before action, and after clicking on the 'Yes' button, then some action from the controller must be fired. Y tried some ...
0
votes
2answers
25 views

Lightning Component Display Integer from Apex Class

I have created an Apex class which takes the opportunity Id and finds me the days between two today and future date, what i'm now struggling to do is display this within my lightning aura component. ...
1
vote
1answer
28 views

How to select all child checkboxes using HTML5 data attributes in Lighting

I have some code in my Lightning app which displays regions and countries beneath them using the code below (sorry its a bit messy I know): <div class="slds-checkbox"> <input ...
0
votes
1answer
689 views

apex:actionSupport with param is not passing updated value to controller

I have a VisualForce page that should pass the selected the value to the controller to update the record. See code below. <apex:inputField value="{!l2.Status__c}"> <apex:actionSupport event="...
0
votes
1answer
28 views

Complete component reload

I need one of my own component to completely reload itself when a given event occurs. By this, I mean I need it to load itself as if the page it is contained in was loaded the first time ; this, ...
1
vote
0answers
26 views

Floating Label | Change Placeholder to Label On clicking the input field [closed]

on click of Input field Want Place holder to behave as label by moving up just look in the image when i enter first name the first name place holder moved up to become label how can i do it ...
0
votes
1answer
49 views

Multiple selection of Check box using Lightning web componnet [closed]

I have a week value in apex as {Sunday, Monday}, in Component, i am using <lightning-checkbox-group name="Checkbox Group" class="RecursEveryWeek" ...
1
vote
1answer
36 views

How to get reference to Component from inside an event method

I have a JavaScript helper method which handles a message sent from a child iframe handleMessage: function (event) { console.log('handleMessage'); console.log(JSON.parse(JSON.stringify(event....
1
vote
1answer
42 views

How to toggle classes off one element and on another after onclick

I am creating a custom menu using the Salesforce Lightning Design System Global Navigation with sub tabs <div class="slds-context-bar slds-context-bar_tabs"> <div class="slds-context-...
-2
votes
1answer
31 views

Regex validation for us phone

when I am using lighting input and using pattern its works <aura:application extends="force:slds" > <aura:attribute type="string" name="phone" /> <lightning:input type="phone" ...
1
vote
1answer
29 views

How to refresh contents of modal on button click? (VF Page)

I'm using a modal that has as input fields object fields linked to the controller. After filling the modal I send the "experience" to the controller and save it and send back an empty singlExp so that ...
1
vote
1answer
23 views

How do I get the value from an attribute after onclick event?

I have an a tag with an onclick event: <a href="javascript:void(0);" onclick="{!c.handleClick}" data="{!a.Id}" And a JavaScript controller method to handle it: handleClick: function (cmp, event,...
1
vote
1answer
29 views

Is it possible to instantiate a javascript static resource?

I have a static resource to reuse javascript between my lightning components. I'd like the code to use specific credentials for an api in a sandbox, and another in production. I plan to use an apex ...
1
vote
0answers
60 views

SSJS - Read a Data Extension after an Rows.Update

i'm now in my firsts baby steps in JavaScript on Salesforce Marketing Cloud. In my script i read one Data Extension with an DataExtension.Init("DE") and a DE.Rows.Retrieve(filter). After this, some ...
3
votes
2answers
127 views

Is it possible to get ui api Picklist Value Collection response body in ltgn comp js (for pcklst dependencies)

Is it possible to access the picklist value collection response body in a custom component js using a built in component? I need access to the dependent picklist values and their validFor property. I'...
0
votes
0answers
14 views

sum of column values from json object and show it in column in angular 2 [migrated]

suppose, i have a json data, and in that json data, i am getting the exact information and showing in my Ui screen, after that i am totalling the data using nested foreach loop, i am able to see the ...
1
vote
0answers
18 views

Apex param or Action Function doesn't work

I would like to get param in Visualforce page. But, I can't get. 1.User input text, and click button in Visualforce page.  User add rows to input text.(I used javascript) 2.In next page, we want to ...
0
votes
3answers
1k views

Action function not getting called during javascript execution

I have a command button which is calling a javascript function. In the javascript function, I am calling my action function. The control is entering the script but the actionfunction is not being ...
2
votes
2answers
855 views

DatePicker Issue

I have two text field: One normal text field that accepts numbers. <apex:inputField value="{!FinancialAssCont.Down_Payment__c}" styleClass="form-control downpaymentAmount" onblur="...
0
votes
1answer
19 views

Basic Checkbox Group handle on change example not working

I am following the basic checkbox group example in salesforce documentation, but ran into a really weird issue in the handle change event handler: JS @track roleCheckboxValues = []; get ...
0
votes
0answers
9 views

SE11 Community Page Issue. Lightning component is not opening

This error is showing in the console when trying to open a component but all seems to be fine. It works in Chrome but not in Internet Explorer SE11. SCRIPT5022: ComponentDef initialization error [...
0
votes
4answers
631 views

Is there any way to define separate redirects for Cancel button and Save button on record creation screen?

I've built a lightning component that runs when the user clicks the standard 'New' button on the Opportunities related list on Account. My component invokes e.force.createRecord meaning it shows the ...
0
votes
1answer
1k views

calling a javascript method to display a value on Output box by clicking apex command link

I am trying a scenario where on clicking a apex commandlink I need to capture a field's value and that value should be displayed on the same page in a seperate output text box or input text field. "...
3
votes
1answer
5k views

error Cannot read property 'setParams' of undefined - lightning component

In a lightning component I call an apex method, like that : for(var cmp in component.find("inQuantity")){ var CallMethod = component.get("c.calculate")[cmp]; var product = component.get("v....
1
vote
1answer
44 views

LWC: How to call a community page on button click in LWC?

How to call different community page from LWC page on button click that exists on a community page without passing the URL? navigateToWebPage() { // Navigate to a URL this[...
2
votes
1answer
26 views

Binding Javascript map to Aura Attribute map

A similar question was asked here but unfortunately not appropriately answered. I have my aura map declared as follows <aura:attribute name="productInfoMap" type="Map" default="{}" in my ...
1
vote
3answers
77 views

Aura iteration does not update the View after array Update?

My lightning component's controller has an array named newResources and using aura:iteration to show a table based on the values in it. There is a method in js "removeNewResourceColumn" which removes ...
0
votes
2answers
37 views

Multiselect Combobox

Is it possible to configure the combobox combo box to allow multiple selections? I tried this method: import { LightningElement, track } from 'lwc'; export default class ComboboxBasic extends ...