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.

Filter by
Sorted by
Tagged with
0
votes
1answer
42 views

Capturing a Flexipage Lightning Tab Change

TL;DR Is there a way to capture / fire a lightning event to know a tab has changed when using the standard flexipage / lightning tabs component? We're trying to design a reactive page that has ...
7
votes
2answers
3k views

Apex JSON.serialize() with null values (RELOADED)

I need to serialize a list of SObject without omission null values. This string I need for a later usage in JavaScript. Structure is crucial, because I need to construct a table out of it. The ...
0
votes
1answer
773 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="...
-2
votes
0answers
9 views

Create custom setting “ValidationSetting“. This custom setting should be used to activate/deactivate any Validation Rule from your org [closed]

Create custom setting “ValidationSetting“. This custom setting should be used to activate/deactivate any Validation Rule from your org.
0
votes
2answers
406 views

Creating a User Initiated Send definition in SSJS

I am trying to create a User Initiated Send definition in my Business Unit with the following code according to the wiki example: http://wiki.memberlandingpages.com/en/documentation/exacttarget/...
0
votes
2answers
23 views

Aura:application with ltng:outapp working but not displaying anything in external container

I've built an Aura app which we want to run in an external container. First, I'm testing this with my localhost with the right SSL cerficiates in place. The localhost address is also whitelisted ...
0
votes
0answers
22 views

Unable to read SObject in LWC

I have a problem which I think could be an LWC bug. I need to pass an object, in this case a contract, which I get from @wire getRecord: have seen that there is a similar thread, which reports ...
1
vote
1answer
31 views

Working with Lightning comboBox, UI:input component and aura handler change event

I have a sample code which is independent of any data model for now. I am trying to display data from a JSON using <Aura:Iteration>. I have below two issues with my code: I do not see the value ...
0
votes
1answer
26 views

OnClick Javascript button to update custom fields

Below is the JS code I've used to update the status field on order object when clicking on custom cancel button. The issue i am facing here is when clicking on cancel button, confirm pop up shows up ...
0
votes
1answer
567 views

user profile in javascript without apex

How can we get user profile in lightning javascript component without writing Apex class? Please let me know
1
vote
2answers
38 views

Combobox options not getting updated in LWC

I have a combobox whose values are supposed to be dynamically added. For some reason this is not happening. I have found similar cases on this website but none of the solutions worked for me. Here is ...
1
vote
1answer
19 views

Trigger a spinner from child component up to parent component (LWC)

I have a checkbox in a custom datatable in a lightning-card. When the checkbox is checked or unchecked, I want a lightning spinner to cover the entire component to stop the user from doing anything ...
0
votes
0answers
15 views

Tree view Structure from xml markup which is stored in a field [closed]

I have to create a tree view(collapsible-expandible) on lightning page from the xml markup stored in a field (Long text area) of an object. The field's value is xml markup. Also the markup is dynamic....
0
votes
0answers
12 views

Allowing Profile's Access to their Respected Links

I am currently working on a piece of code that will allow a certain group of profiles launch out from Salesforce to another web application. Any other profiles will be staying on Salesforce. I have ...
0
votes
1answer
24 views

Connecting to pushtopic event via Java Client via Proxy

I am trying to run the emp connector sample provided by Salesforce. When i tried running the sample, i was getting socket timeout. After investigating, i realized that our company is behind firewall ...
2
votes
0answers
21 views

Can not Remove class in Lightning Component

**Lightning Component1 JS** clearAllClickedButtons : function (component, event, helper) { component.set("v.uncheckButton",''); var clearAllFilters = component.find('uncheckButtons');...
0
votes
2answers
1k 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

How to read value from pop up and display on parent page and close the pop up

I want to create pop up which will open if you click on a text box. On pop if I put any value and once click on save the same value should be populated on parent page according to option selected in ...
0
votes
1answer
643 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
40 views

Using Web-to-Lead on Accelerated Mobile Pages (AMP)

We are having a problem with converting our current AMP form to a web-to-lead form with SF. Currently the access-control-header is set using our back-end PHP handler which lists our website. I don’t ...
1
vote
1answer
731 views

How to pass values between two components

In a VF page, I have two i.e. A and B.In first component,there is a search box. Second component will display data type in first component search box. So How can I pass data between these two ...
0
votes
1answer
26 views

Unable to click a button in a pageBlockTable with JQuery

I have a Visualforce SPA that is working well but I cannot display an alert or perform any other operation with JQuery when clicking a button inside a pageBlockTable. I found that using the span tag ...
1
vote
1answer
37 views

Importing Function from LWC js File returns 'Is Not Function'

Trying to figure out how to share JS functions with another component. I have followed the documentation on the LWC here Here is the functions.js file reusableLWCFunctions.js const myfunction = (...
1
vote
1answer
43 views

LWC data table JS issue: “cannot add property accountName, object is not extensible”

APEX CLASS public with sharing class datatabletest{ @AuraEnabled(cacheable=true) public static List<Theme__c> getData(string userId) { return [SELECT Account__r.name, ...
0
votes
0answers
18 views

OpenTab with focus after closing some other tabs on Console Navigation Apps

I have overriden new Account and Edit Account standard actions with some custom Lightning Components. On console navigation apps i want to close some tabs on Account save and then open a new tab to ...
2
votes
4answers
1k views

Clicking button should reload the page and the callout must be performed asynchronously

My question is, should clicking a button reload a page and perform an asynchronous callout? It looks like its reloading the page after finishing the callout. Custom Button : Execute JavaScript {!...
1
vote
1answer
37 views

Easy LWC question about setting values when fields return blank in the component

Problem. I have a related record to an opportunity and I'm able to get the data from that record to populate successfully on the LWC. I would like to add some checks incase the fields I'm bringing in ...
0
votes
1answer
22 views

read only required field from standard detail page of community on any profile basis

in the community, we have a standard detail page where we want to restrict customer to update the status field what we have done until are following. CSS by a hierarchy of dom inside aura HTML but ...
0
votes
0answers
30 views

How can i Call a Custom Button from JavaScript? [closed]

How can i Call a Custom Button that executes a functionality (creates a new Site) from JavaScript which is Triggered when another button is Clicked in some Page ?
2
votes
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/...
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 ...
0
votes
1answer
44 views

Javascript Object Constructor in LWC

How would one go about creating a javascript object (not literal) in LWC? i understand the standard syntax of something like function bar(dog, cat) { this.dog = dog; this.cat = car; this....
0
votes
0answers
20 views

Complete callback not called [closed]

After the payment is done on the mastercard server the complete callback method is not getting called. <script src="https://ap-gateway.mastercard.com/checkout/version/54/checkout.js" ...
0
votes
1answer
48 views

LWC Relationship fields in data table, flattening in @wire

I am struggling with relationship fields in a datatable using Lightning Web Components. I am querying through Apex and returning a list from the DB. I've looked through a bunch of threads here on ...
2
votes
2answers
937 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
32 views

Adding functionality to change language of a visualforce page through a picklist

I have a visualforce page with a couple of Required Fields. The fields are made Required on the front-end by setting the Required attribute to True. There is a picklist on the top-right corner of the ...
0
votes
0answers
37 views

How to call Intent Api from postman or JavaScript

curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no- cache" -H "Content-Type: multipart/form-data" -F "data=@C:\Data\weather.csv" -F "type=text-intent" https://...
2
votes
1answer
39 views

Access the List<String> in wrapper class to LWC

I have a wrapper class in my apex controller. global without sharing class Homepage_Ctrl { public static List<variableDTO> dtoList = new List<variableDTO>(); public static ...
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. "...
0
votes
0answers
28 views

call controller function from dynamically created dom element

I have created Dynamic Dom element button using renderer in my lightning component. Now I am trying to give pass reference of a function to the onclick attribute of the button. when the button is ...
0
votes
1answer
388 views

How to add two buttons under one column Lightning Datatable

Is there a way to have two buttons in one column using lightning Datatable? Would like to join the "Delete" and "Edit" buttons under the "Action" column. Controller.js ({ fetchAccounts : ...
6
votes
1answer
2k views

querySelector not getting element in lightning web component

I am creating a popover, where I need to position it correctly based on the button's position that triggered it. It starts like this: <div id="popoverWrapper" class="popover-wrapper" style={...
1
vote
2answers
872 views

Using a selectRadio list to set the value of individual checkbox fields

I have a VF page on the Account. I have set up 3 radio selections using apex:selectRadio and a Script. I would now like to populate custom fields on the Account (Field1__c, Field2__c, Field3__c) ...
0
votes
2answers
35 views

Alphabet sorting for Column headers

Im trying to create a customize list view in my component that have the same function as a normal listview column headers => when you click on the header, the list will change in to alphabetical order ...
0
votes
1answer
939 views

How to close a primary tab

I need to open a vf page in same primary tab by closing the current primary tab on clicking the custom button in the detail page. {!REQUIRESCRIPT("/support/console/36.0/integration.js")} {!...
1
vote
2answers
504 views

Javascript function calling in LWC

I am calling a controller method Imperatively and in the response/Success, I am trying to update the @track property but its giving me an undefined error. Below is the code. import { LightningElement,...
0
votes
1answer
471 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'...
4
votes
2answers
604 views

Stripe integration for Salesforce in lightning components

We are trying to implement Stripe integration with Salesforce by using Lightning Components for payments. Stripe use an API for securely obtain the users card information. This API is for the client,...
1
vote
1answer
48 views

Formatting Date in JS controller in Salesforce

We have a requirement that the user will give the Date format in the text field, we have to validate the date format whether it is valid or not based on the Salesforce Localization method. But SF ...
0
votes
3answers
1k views

Stop Exact Target Web Collect success redirect

I have a web collect form that will be used in a light box modal for email capture. On the form submission I have a function to hide the div that contains the form and display the thank you div but it ...