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
0answers
13 views

Javascript proxies were not generated for controller {MyApexClass}: may not use public remoted methods inside an iframe

I have an apex controller for a VF-page. I got this error couple of days ago. I got this error on my UAT-org but not on my dev-org, even though both are running on the spring 20' release. if I ...
12
votes
2answers
238 views

Is there a maximum result size for @AuraEnabled Apex methods for Lightning Aura components?

I have a Lightning Aura Component with an Apex Controller selecting a (kind of) huge amount of data. It is querying a custom object elfBCProject__c with a sub select on a child object ...
0
votes
1answer
61 views

why @track list doesn't rerender after value is changed?

i have a list of sobject that is retrieved from the db thanks a call to an apex method tha return the list, the list is retrived async with a the setInterval function . //this is the sample of the ...
0
votes
0answers
13 views

OpenCTI for a third party domain

I want to give a third party to write the softPhone HTML file. Inside the HTML they should use the OpenCti.js library. The below link will work only from VF page. <script src="/support/api/48.0/...
0
votes
2answers
36 views

How to pass value to date parameter in apex method from LWC JS?

Please provide a proper way to call this method from LWC passing date parameter. public with sharing class ApexClass { @AuraEnabled(cacheable = true) public Date string apexMethod(Date z) { ...
0
votes
0answers
10 views

Lightning Locker Service is not allowing to use Web3.js library in lightning components

I have a requirement to use web3.js library in my lightning component but lightning locker service is not allowing to use that library and i am getting following error: "Custom Script Eval error in '...
0
votes
1answer
27 views

Custom lightning component disappears without errors in log, when button clicked, but only in production

I have the same lightning-button-stateful onclick event handler in the sandbox and in production. _handleSectionExpandCollapse(event) { let content = event.target.parentElement; event.target.selected ...
0
votes
0answers
17 views

How we can call external javascript from xslt in jitterbit? [closed]

I want to call javascript function from XSLT in Jitterbit studio. like we can call custom javascript function in App-Connect(cast-Iron IBM) XLST using <xsl:template name="custom_formatDate_1"> ...
-1
votes
0answers
11 views

Is it possible to insert record from community site pages using on load Java script function?

We want insert record in custom object when a site page is loaded in community. For that we would like use interactive javascript feature. when trying to use below script it is throwing error ...
0
votes
0answers
23 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 ...
0
votes
1answer
28 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
2answers
29 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 ...
1
vote
1answer
35 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 ...
1
vote
2answers
50 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
26 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
13 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 ...
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
0answers
41 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
41 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 = (...
0
votes
1answer
27 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
46 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, ...
1
vote
1answer
40 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
20 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 ...
0
votes
1answer
48 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
1answer
51 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 ...
0
votes
1answer
58 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 ...
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
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
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
0answers
39 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://...
0
votes
2answers
36 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
34 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 ...
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
1answer
21 views

VF with long:out within SImpleDialog iFrame in classic console - Cant close or refresh tab

I have some legacy code that works everywhere except it is now broken in Salesforce Classic Sales Console. The code is executed from a javascript button that put the content of a VF page within an ...
0
votes
2answers
43 views

Unsupported browser warning message after user login

We want to show a warning message for an unsupported browser to the user. Our system is developed into salesforce classic and wants to show an alert or simple warning message once when user logged in ...
0
votes
1answer
44 views

SSJS script to update query and start automation with 3 minute wait in between each loop iteration

I have a script that have nested loops that loop through some arrays. In those loops, I have a something that updates a SQL Query Activity, then something to start an automation. What I am trying to ...
-4
votes
2answers
53 views

How to show default value in Lightning:input? [closed]

I want to show default value as 0.0 in lightning:input field on page load. I don't want it to be a placeholder.
1
vote
0answers
61 views

Dynamically assign sObject field details in LWC

I have created a inline editable LWC. This solution is dynamic i.e. to add a new field on the table , i just have to add on field set and based upon field type and access, it will be displayed in the ...
0
votes
2answers
36 views

Error While uploading document to File(Contentversion,ContentDocument) In visualforce

I was using Attachment to upload file and link to custom object record in my visualforce page but now moving logic from Attachment to file and linking uploaded file to custom object record(parentsId). ...
1
vote
2answers
60 views

How to import jsconfig into a LWC?

I am developing a catalog of all the LWCs and I want a dynamic list of the components. I figured since jsconfig.json already has the dynamic list of the components in a handy JSON form, I can just ...
0
votes
0answers
26 views

window onclick listener not working properly

I have created a custom lightning web component that, if an specific div is found on the template and you're clicking outside of it, it must close the current div constructor(){ super(); ...
0
votes
0answers
28 views

accessing proxy inside a proxy object in LWC

in the picture are two responses when i query the task object. My use case is that I have to iterate over the response using For:Each, For:Item and render a list in the .html file of {Task.Id}, {Task....
1
vote
0answers
29 views

Open a Base64 PDF from Lightning Component JavaScript in new Tab

I am trying to open a PDF that I am getting from a response from a microservice. I am able to receive the PDF and set the parameters for it within the lightning component helper, and download it. ...
-2
votes
3answers
68 views

Setting unique key in for:each and for:Item [closed]

<template for:each={arrays} for:item="array"> <li key= ?> {array} </li> </template> in Js file my 'arrays' is array of ...
0
votes
2answers
70 views

Upon clicking Lightning Combo-box, I want to store Value & Label both? [duplicate]

I want to store both Value & Label attribute upon clicking particular Combo-box value, but currently I am only able to get Value. When I try to store & print Label - it says undefined. Here ...
0
votes
0answers
27 views

Updating Publication List of an Email Send Definition with SSJS or WSProxy

I can update the Data Extension just fine but when I add the "PubListKey" value from the documentation(here and here) the publication list is not updated. I thought it might be because it's a shared ...
2
votes
1answer
25 views

Reference static resource in the header of a community portal

I need to reference a static resource JS file from the header of a community portal. What would be the appropriate way to get the url for the static resource? Right now I have the JS code of the ...
1
vote
1answer
35 views

Lightning datatable displays empty field as 'undefined' instead of blank in LWC

I have an LWC in which I used datatable to display addresses. I have constructed address separately (as it is a combination of various fields) and provided it to datatable. Problem is, when a field is ...
1
vote
1answer
28 views

Display javascript variable in visualforce

I can't figure out how to display the "total" javascript variable in the apex:facet section of the Visualforce page. I keep getting "Cannot set property 'innerHTML' of null" as the javascript error. &...