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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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 ...

4
votes
2answers
33 views

accessing a lighning inputField lookup name client side

I am easily able to fetch a lookup ID from a inputField <lightning:recordEditForm objectApiName="Case"> <!-- the messages component is for error messages --> <...
0
votes
2answers
22 views

PageReference .getParameters Method - Javascript Equivalent

Is there a javascript equivalent to the .getParameters method of the PageReference Class? Elaboration of what I'm trying to do: I am have a VFP search page and a CTI adapter. The CTI adpater pops ...
0
votes
0answers
35 views

What are the limits of using a third-party framework to build a community?

I have a client who wants a super custom looking Lightning Community. I know two options to build it are with Visualforce and Lightning Components. I tried using Lightning Components, but was met ...
10
votes
2answers
84 views

Lightning support for eval() in Summer 18

I thought that eval() was supported in Lightning in Summer 18. According to the release notes, it is: The eval() function is now available in Locker Service, even when Strict CSP is enabled. This ...
0
votes
1answer
54 views

Random 16 character ID needs to be generated [on hold]

I need to generator random 16 characters in marketing cloud ,how can i achieve this?
0
votes
1answer
22 views

how to hide and show div in VF page using jQuery [on hold]

I have a requirement that whenever user hits the Edit button the particular div should not show up,I've tried it to do so but since I am new so can't figure it out.This is Visualforce component. ...
2
votes
1answer
25 views

ltng require scripts not working for me!

I'm having trouble accessing my static resource (a js lib) in my controller.js in my lightning component. My goal is to bundle up all my javascript functions and classes and use across most ...
0
votes
1answer
17 views

How to call a javascript method from an apex method to display a button

I have a use case where I have a button "Add another". I want this button to be hidden until an apex method "Save" is called. The save method calls a javascript method which in turn displays the ...
2
votes
1answer
22 views

no response when calling rest api from javascirpt function

i have two org, first org i have written code for GET method, Second org i am calling a the rest api GET method from javascipt code. in the calling org i dont get any response but it response with ...
2
votes
0answers
16 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 ...
0
votes
1answer
30 views

How to prepopulate address information via lightning:inputField tag used in lightning:recordEditForm?

I'm currently working on a form using lightning:RecordEditForm tag. I'm using lightning:inputField tag to display Account's BillingAddress fields (country code, state code, street, city, zip/code). &...
0
votes
1answer
20 views

Is it possible to use something like showHelpMessageIfInvalid() on lightning:inputFields?

I want to trigger the "complete this field" message on a lightning:inputField if it is invalid (empty value). This works fine on a normal lightning:input, but is there a way to do it on an inputField? ...
0
votes
0answers
11 views

pre populating the account related field value in custom object 'X' having look up with account object when selecting account name [closed]

I have an custom object say 'X' having one field look up with Account object. When i select the Account name from the look up i want to pre-populate the account related field for the related record ...
0
votes
2answers
32 views

Use Recently Added Lead Object Id to Open Primary Tab

Simplifying/Clarifying Question: Command button invokes method to insert lead object. Need to use a console tab method to open the newly inserted lead object. How do I pass the id back from the ...
0
votes
1answer
27 views

Illegal assignment from list to list for custom class and aggregateResult

I have a custom controller and visualforce page. The page loads fine with the SummaryList. When the user enters parameters, it should filter the list according to the runSearch method. I'm getting an ...
1
vote
2answers
37 views

Change cursor during client side processing in Lightning

I have a Lightning component that contains a table of retrieved data. The user can sort or filter the data in the table. Note that the data is on the client side in a list of Javascript objects and ...
0
votes
1answer
19 views

Script to Propercase all Records in Sales Cloud

I just became our Sales Cloud Admin and need to clean up our mess of data. I want to go in and run a script to propercase all the records so they have unified capitalization. Is it possible for a ...
0
votes
1answer
22 views

IFrame is not supporting in Salesforce Classic and Lightning [closed]

I am using iframe to create a dynamic dashboard. For that I have embedded reports in VF page with the help of iframe. Earlier it is supported but now it is not. Is there any workaround for this. So I ...
0
votes
1answer
37 views

Javascript Filter In Custom Controller Not Returning Filtered Results to Visualforce Page

I have a custom controller and page with a few lines of Javascript. The functionality should work as follows: when a user enters a state or account name in the parameters, the list of accounts and ...
0
votes
2answers
40 views

Prepopulate Lead Phone Field from Visualforce Page

What is the best way to prepopulate the lead phone field or any field on the standard lead creation page? I currently have a link on a visualforce page to open the lead creation page, but URL hacking ...
1
vote
2answers
84 views

Print Button function in Salesforce

I have created a print button and passed following javascript method :- When I am clicking on the button Print I am getting below error:- Please help. Thank you.
0
votes
1answer
29 views

Apex Paramater always null

I have an Apex method createRecurringEngagements that accepts a Boolean parameter jewishEducator (the last param). I print the parameter in the Apex class but it is always null. I tried accepting ...
0
votes
1answer
46 views

Handling Error Messages on submit of recordEditForm

I have recordEditForm in my component to create a new record. On submit of the form, the page lightning message shows "An error occurred while trying to update the record. Please try again." Then I ...
2
votes
1answer
54 views

Passing sObject List from Client Controller to Server Controller (Lightning Components)

Seems like I'm not being able to pass a sObject list to my server-side controller. I've seen articles and other forum answers that propose using JSON.stringify. I've tried that method, but my server-...
0
votes
1answer
24 views

Compare What User Typed in VF inputText with JavaScript

In the code below, I need to be able to use JS to call renderResults(); in my controller, only if a user clears the field where customerToClearSearchText goes on the VF page. If I remove the ...
0
votes
0answers
23 views

fuel-soap.js passing in access token

Using FuelSDK 1.22 in Java, with only slight modifications for a proxy, I am able to make soap calls to Salesforce for a variety of things. I am trying to move some of my code to node.js to run in ...
0
votes
0answers
18 views

How to catch View State Exception and display custom message instead

I have a controller extension for a VF page that runs a query that could possibly over load the view state, I don't want to optimize it but instead catch the exception and display a custom message. Is ...
0
votes
1answer
31 views

problem on Visualforce page with javascript code

I need help. I have a custom button on opportunity "Involve PreSales". I inserted in this button a javascript code. If the conditions are verified it opens vf page, if conditions aren't verified it ...
1
vote
1answer
32 views

auto populate the account record field value

I have a custom object 'X', while creating a new record in object 'X' there a lookup field related to account object, when i select any account name 'Vinay' then the 'vinay' related account record ...
1
vote
0answers
39 views

How to programmatically identify that no modal is visible on screen?

I want to identify that screen does not have any modal visible, and based on this, I want to show or hide the window's default scrollbar. To show/hide the scrollbar I got excellent solution from this ...
0
votes
1answer
23 views

Hide/Unhide picklist using jquery on VFP [closed]

For some reason, the init in the javascript hides everything BUT the joint billing partner code VFP: <apex:pageBlockSectionItem id="PPJPN"> <apex:outputLabel value="...
15
votes
3answers
886 views

What are the outer parentheses in Lightning controllers?

In every Lightning controller you have these outer parentheses wrapping the actual object: ({ getInput : function(cmp, evt) { var myName = cmp.find("name").get("v.value"); var ...
4
votes
1answer
91 views

How to use JsForce in a Salesforce Lightning Component

BACKGROUND I would like to be able to interact with the various Salesforce REST API from client-side JavaScript code, without needing to go via a Apex controller method and then making a separate ...
7
votes
1answer
55 views

Can we detect Lightning Action progress?

We have a Lightning file uploader, and some of the files could end up being quite large (probably up to 1.5MB of base-64 encoded data), but we also have a slow network, so users might assume that the ...
1
vote
1answer
32 views

Execute Javascript on VFP from Controller Query Results [closed]

I have a Visualforce Page with inputs, these input values are passed to a controller, query results are returned, and results are displayed in a datatable on the same VFP with inputs. If the list I ...
0
votes
0answers
17 views

Discerning a Production SessionId cookie from a Sandbox one

I'm trying to explore the browser's cookies and identify the Production SessionId. The thing is when i retrieved all the cookies filtered by sid, which is how they're called, I recieved over 30 (...
0
votes
0answers
9 views

CloseTab Callback Function not Executing

Callback function is not executing in console tab method closeTab, but the id provided to the method IS closing. Why? function callback (result) { console.log('in callback'); }...
1
vote
1answer
37 views

How do i check if a user logged into salesforce from javascript? Either through api or reading cookie value [closed]

We want to allow users who are already logged into salesforce and have access to our application to continue to our application home page without going through the login flow , if not we want to take ...
0
votes
1answer
19 views

Create record with lookup relationship

Am trying to save contact record with Account input in lightning component. Component: <aura:component controller="addDeleteController" Implements="flexipage:availableForRecordHome,force:...
1
vote
1answer
40 views

Understanding $A.getcallback() usage

I'm a rookie at lightning component development and i'm trying to understand in which situation we should use $A.getcallback. It's not really clear for me when to use it and the explanation in the ...
0
votes
2answers
28 views

JS Button active only if checkbox is True

I would like to create a Detail Page JS button with the below (under the Lead object if it matters) If A=TRUE and the button is pressed, update checkbox B to TRUE. If A=FALSE and the button is ...
0
votes
1answer
26 views

How do I sort a rowset with Server Side Javascript linked with AmpScript?

I'm using AmpScript to make a custom email and I need to sort rows to display them in order of date. I saw that I can use Server Side Javascript to make this, but my variable in ampscript is a rowset, ...
0
votes
2answers
38 views

How to restrict a <apex:inputField> for decimal value upto 5?

<apex:inputField value="{!expence}" styleClass="slds-input inputWidth August" onchange="updateAfterBlur();" /> Input - 12.22222 (Decimal value ...
0
votes
0answers
21 views

Make field required by using javascript in Visualforce page

I have a requirement where I store a value in a javascript variable, and based on that JS variable I want to make an inputField required. I referred the below link, but javascript was not used. how ...
3
votes
1answer
113 views

Array.filter() in Lightning Components

I'm trying to filter through an array of objects in a controller using the JavaScript filter() method. I get an error, however, that says, Uncaught Action failed: c:QuestionIteration$controller$...
1
vote
1answer
61 views

Multi Insert with recordEditForm

Is it possible to bulk insert a records using recordEditForm component?. Here's the sample lightning component which I tried: <lightning:recordEditForm aura:id="editFormAccount" objectApiName="...
0
votes
0answers
26 views

Populating a Field based on the Value of a Field in a Different Object in Lightning Component

I'm trying to build a very simple survey type component that has three objects: Questions [FFS_Key_Area_Bank__c; the questions], Results[FFS_Results__c; the rating on a particular question], Surveys [...
0
votes
1answer
47 views

Lightning Component to Replace Javascript Button - Take Ownership of Cases

thank you in advance for your assistance. We have a Javascript Button "Accept Case" which checks the owner. If the owner is not the existing owner, then you can click on this button and taken the ...
1
vote
1answer
55 views

Failing to catch empty string with if statement

Having some trouble with Javascript values in a Lightning Component Controller/Helper. This function is part of a form. Before submission, it goes over required fields and checks if they're empty so ...
1
vote
1answer
35 views

Cannot read property 'Converter' of undefined, when using StackExchange PageDown Library in Lightning Component

BACKGROUND I am trying to use the StackExchange PageDown JavaScript library: Markdown.Converter.js - (click to view source) Markdown.Editor.js - (click to view source) Markdown.Sanitizer.js - (click ...