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

can not connect salesforce LWC and fullCalendar V5

I know that this question has already been asked here - stackExchange The change which has been suggested, in the fullCalendar library is I think already has been implemented in it by FullCalendar ...
user avatar
  • 1
1 vote
0 answers
18 views

Unable to load DHTMLX Spreadsheet JS into LWC

Background I am trying to use DHTMLX Spreadsheet in an LWC I've added the JS and CSS as Static Resources: DHTMLX_Spreadsheet_JS DHTMLX_Spreadsheet_CSS And Session Settings > Lightning Web ...
user avatar
  • 8,223
0 votes
1 answer
23 views

lightning message service not working

I'm using Lightning message service to pass message from LWC to another LWC.Both components are custom components used in community pages. The message is not being sent to the other component. ...
user avatar
0 votes
1 answer
12 views

How to Refresh or re render DIV in lwc

I have an attachment button that works fine. Now I want to cancel button which cancels the uploaded file. For this, I need to re-render the div by clicking the cancel button. How ?.IS there is better ...
user avatar
  • 1
0 votes
0 answers
7 views

LWC jsPDF-autoTable plugin not working as expected

I am importing both the cdn static resources for jsPDF and the jsPDF-autoTable plugin. Here is how I am loading it in: import { LightningElement } from 'lwc'; import { loadScript } from 'lightning/...
user avatar
-1 votes
0 answers
19 views

Change commandButton color based on value in visualforcepage

Previously I had a checkbox to select data true or false, but the checkbox did not run perfectly when executed with a datatable, the value of the checkbox on another page will be set as false ...
user avatar
2 votes
1 answer
21 views

LWC - getObjectInfo not working

I am trying to get all the record type options for Opportunity. I am using getObjectInfo directly copied from the documentation but I keep getting the same error: Documentation: https://developer....
user avatar
0 votes
1 answer
14 views

How to access an Apex Map in LWC JS

In Apex I have a map of Map<Address__c, List<Mortgage_Account__c>>(); and I am parsing this and getting it in an LWC, mortgageSummary. Here is mortgageSummary.js: import { LightningElement,...
user avatar
  • 368
0 votes
0 answers
37 views

LWC - Input won't open onscreen keyboard

I have a simple input on a lwc that, when clicked/tapped on needs to open the onscreen keyboard. How do I do this? Update: <div> <input type="text" id="text-input-id-1" ...
user avatar
0 votes
0 answers
14 views

I need to write some code to get the functionality for an Answer Box(HTML text). I'm not able to copy to default answer from Answer Box

I'm working on a Fonteva Project and I need to write an additional functionality for the next button as per the below image. If there is any answer change detected then the user must go directly to ...
user avatar
-2 votes
0 answers
18 views

redesign of the new website [closed]

There are two websites of the same company, identical as two drops of water. The only difference is that one is wholesale, the other is retail (that is, only the prices are different in the product ...
user avatar
  • 1
1 vote
1 answer
23 views

NavigationMixin not working on community

I want to navigate from lwc component firstComponent to a community page enerie test. FirstComponent import { NavigationMixin } from 'lightning/navigation'; export default class FicheNutrition1 ...
user avatar
-1 votes
1 answer
21 views

How to remove the Unwanted string from my Iframe tag it only show's up in the chrome browser?

some unwanted string is getting displayed on my iframe tag in the chrome browser how should i remove it
user avatar
2 votes
3 answers
62 views

Spread Operator Usage in LwC

I have a javascript related question. I have the piece of code using a spread operator var arrObj = [{ name : "m"}, { name : "mb"}]; var arrObj1 = [...arrObj]; console.log(arrObj1);...
user avatar
  • 1,071
0 votes
1 answer
37 views

Multi column sorting in lightning web components

I am a new developer in salesforce and I would like to ask: Is there a way to have multi column sorting in lightning web components? I mean 2 level of sort active at the same time? i.e first name as ...
user avatar
0 votes
0 answers
53 views

FlowNavigationBackEvent Doesn't work on LWC?

I'm replacing flow footer screen with LWC : Cancel Button is supposed to change case status and go back to previous screen Submit button is supposed to go to the next screen Code : handleGoNext() { ...
user avatar
  • 3
0 votes
0 answers
8 views

Not able to download attachment in actual mobile in LWC javascript 'NavigationMixin.Navigate'

I have a Contentdocument and I am using it inside 'NavigationMixin.Navigate' to download this document on click of button. It is working fine in desktop and also working fine when I make desktop as ...
user avatar
  • 624
-1 votes
1 answer
42 views

Hide/Show columns of lightning-datatable in Lightning Web Components

Is there a way to hide/show columns dynamically (not just headers,the whole columns) of a datatable in lightning web components? Can you provide an example please?
user avatar
0 votes
1 answer
14 views

Pass a variable from AMPscript block to Client side JS?

I have an index.html file with the following structure: %%[ SET @contactId = AttributeValue("_subscriberkey") ]%% <!DOCTYPE html> <html lang="en"> <head> &...
user avatar
  • 13
-3 votes
1 answer
27 views

How to trigger a HREF tag from JavaScript in LWC

I have dynamically created a href in js file. I have to trigger the <a href> from the js file and the link is not present in the HTML part. But unable to trigger the link. let content = <a ...
user avatar
0 votes
1 answer
35 views

LWC Set Interval function not working when used inside a wire function

I have created a LWC countdown timer but timer does not decrease in real-time. I have looked through similar posts regarding SetInterval and try to implement the recommandations Arrow function not ...
user avatar
0 votes
1 answer
25 views

Lightning input type="datetime" not auto-populating values prior to 9am local time

I have a lightning component which has a datetime field, the value of which is auto-initialized with the component's helper.js. The default initialized value is supposed to be today's date and the ...
user avatar
  • 56
0 votes
0 answers
14 views

Changing Animation keyframes Dynamically

I am creating a custom progress bar, and wish to display a light that animates from left to the right of the bar. Here is the code I have attempted. <template> <template if:true={target}&...
user avatar
-3 votes
1 answer
32 views

Cannot use 'import' in LWC JS [closed]

I am having an issue: In my LWC, I cannot 'import' anything, I always get the following error: Failed to save PropertyTileList2Controller.js: c.PropertyTileList2: Failed to parse CONTROLLER for js://...
user avatar
1 vote
1 answer
35 views

Update lookup field on custom button click using Javascript

We have a custom button to update a lookup field if it's blank on the button click. I'm using flow to update the actual value. However, when 2 users click on the button at same time, the 2nd click ...
user avatar
  • 11
0 votes
0 answers
22 views

How to close LWC Quick Action when the page is refreshed?

I have a quick Action button on Account page which is calling the LWC lightning-quick-action-panel component. By clicking on the quick Action button a model box opens, now when I refresh the Account ...
user avatar
-1 votes
1 answer
39 views

TypeError: Cannot read properties of undefined (reading 'DOB') in for loop

applicantToCreate is array having properties DOB. @track applicantToCreate = []; isValidApp; validateApplicantsfields() { try{ this.isValidApp = true; for(let ...
user avatar
0 votes
1 answer
26 views

How to sort records on javascript based on a nearest due date [closed]

For example (YYYY-MM-DD) record=[2022-12-30, 2022-04-01, 2022-05-30, 2022-07-30, 2022-06-30]; After sorting record=[2022-05-30, 2022-04-01, 2022-06-30, 2022-07-30, 2022-12-30,]; So if we ...
user avatar
0 votes
1 answer
18 views

How to pass lightning:outputField value which is used in recordViewForm

I want to pass my lightning:outputField value to aura controller on hover the field. I'm not able to find a way to do it. Below is the code. <aura:iteration items="{!v.completeList}" var=&...
user avatar
  • 23
0 votes
0 answers
38 views

DHTMLXGrid library import to Lightning Web Component

I would like to ask if someone has used DHTMLXGrid library https://dhtmlx.com/docs/products/dhtmlxGrid/ with Lightning Web Component. Is it compatible with Lightning Web Components or locker service ...
user avatar
0 votes
1 answer
19 views

how to put html body on mailto href with lwc?

I create quick action button to open outlook app. and behind the scene Iam using LWC Headless Action to make it happen. and the following code is my complete lwc TestSendEmail.html <template> ...
user avatar
  • 101
-2 votes
0 answers
8 views

Static Image Resource to be dynamic based of checkbox field in account Object

I’m trying to add some conditions to which image to show based of a checkboxes? if checked to show image if not! to not show the image so far I have this but not sure how to call that checkbox field ...
user avatar
  • 1
0 votes
1 answer
29 views

Why does my publication list array return undefined in Vuejs?

I'm learning to build a custom preference centre and trying to display all the lists for a subscriber. I retrieved all the lists like below: <script runat='server' type="text/javascript"&...
user avatar
  • 13
0 votes
1 answer
22 views

Update variable in a JS Static Resource

I have a js library uploaded as a static resource that I am using in my VF page. This library has a "config" object which contains server info etc. The problem is that I need to update the &...
user avatar
  • 33
1 vote
2 answers
41 views

How can we define the events method in util.js or exernal js file and export that method in lwc component

How can we define the events method in util.js or external js file and pass event parameters, like handleOnclick(event)? For Example, I have one lwc component named - helloWorld and in my helloWorld....
user avatar
  • 13
0 votes
4 answers
66 views

getter vs setter in LWC

Can a getter do everything that a setter can do? For example, uppercaseItemName; @api get itemName() { return this.uppercaseItemName; } set itemName(value) { this.uppercaseItemName = value....
user avatar
  • 167
-1 votes
0 answers
34 views

Render PDF page by page with bounding box in Salesforce LWC [closed]

We have a requirement to render pdf as images, which we'll send to AWS(Texract) for processing. Has anyone used PDF.js in LWC or any other 3rd party js to render pdf? We have tried using the psf.js ...
user avatar
  • 116
0 votes
0 answers
36 views

LWC: add new values to existing array

I have a multi select lookup component allowing users to select multiple accounts. My issue is that I am unable to add more accounts to the existing list Let's say I have 2 existing accounts on my ...
user avatar
1 vote
1 answer
21 views

Map with empty values are omitted by default

Below is the way I store the keys and values in my map. Map<String, Object> mapNew = new Map<String, Object>(); Object obj = record.get(fieldName) != null ? record.get(fieldName) : null; ...
user avatar
  • 23
0 votes
1 answer
38 views

LWC : How can I make the menu folding/unfolding function? (double layer)

I'm making a menu folding/unfolding function. When there is one submenu, it is completed, but the problem is when there are two submenus. When you unclick a menu with the expand function, all of the ...
user avatar
0 votes
0 answers
7 views

Pop down using jquery does not revert to original when selection is changed

When I click on anything that is 2 - Somewhat dissatisfied and below I want id="section1a" to pop down. This part works. However if I change my selection back to anything 3 - Neither ...
user avatar
  • 33
0 votes
1 answer
23 views

Cannot QuerySelect element inside renderedCallBack

I have this code below for my html <template> //do stuff <template if:true={openModal}> <ul> //add dynamic list here </ul> </template&...
user avatar
0 votes
1 answer
39 views

Dynamically change color and font weight of text/numbers in LWC?

I want to change values of numbers dynamically depending upon certain conditions. When the number less than 0, i want to change the number's color : red, and font-weight:bold. {record.excessMh} will ...
user avatar
0 votes
0 answers
30 views

Download Data Extension to csv or Excel file via Cloud Pages (Marketing Cloud)

a team in our company needs to be able to download a data extension, and they would prefer to go to a Cloud Page address and just click a download button to download a file in their browser instead of ...
user avatar
0 votes
0 answers
38 views

Detect end of scrolling in <apex:iframe> element - Visualforce

Hi I have a problem with this iframe element in visualforce, i need to detect when user scroll down at the end of the element. This is the html: <div class="scroll" Id="iframe" ...
user avatar
  • 23
0 votes
0 answers
19 views

Using JS Script that requires JSON-LD structured data in LWC

Hello and thank you for your time, I am trying to use this button which requires a JS script that takes JSON-LD structured data from html, I can't figure out how am I supposed to load it because I can'...
user avatar
1 vote
1 answer
47 views

Child component not getting re-rendered when parent component data is changed in LWC

I have a Parent component with a child component inside. When I click on a button in parent component, the Id related to the button is being sent to the child component. When I print the Id sent to ...
user avatar
  • 13
0 votes
1 answer
30 views

Pass values from Apex Script to LWC JS [duplicate]

I have built an LWC Component to display a Toast message without clicking a button. I plan to add this to our Portal so we can display custom messages. I have created a Custom Object, ...
user avatar
0 votes
1 answer
26 views

Open Modal Popup on Onchange in Aura Component

I have requirement in Aura Component where an input is given in input field and on its onchange I have to show modal popup, which asks whether I have to save the changes or not. Need little help in ...
user avatar
1 vote
0 answers
22 views

How to identify what action started QCP Calculator Plugin script in Salesforce CPQ?

I'm using a JS script as a plugin for QCP calculator to do some stuff after every change in Quote Edit Lines. Now I need to run the script only when user presses Calculate or Save button. The only ...
user avatar

1
2 3 4 5
102