Skip to main content

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
29 views

Sorry for the confusing title. I'm working on an lwc for a client that consists of two data tables. It's used to select assets. This client has over 10 million assets and needs to select multiple ...
Michael Kerby's user avatar
0 votes
0 answers
14 views

How to detect when a user changes width of columns? I would like to use an event handler for this so I can save the new width of columns into localStorage and set initialWidth of columns to stored ...
Z0q's user avatar
  • 51
-1 votes
2 answers
47 views

Using the <lightning-tree-grid> view I would like to show conditional images as values. I do know how to change the CSS but I haven't yet figured out how to make conditional images show ...
Z0q's user avatar
  • 51
-1 votes
0 answers
23 views

How to get rid of this error showing up in the console on any and every page in Salesforce? The Content Security Policy directive 'report-to' contains more than one endpoint. Only the first one will ...
Z0q's user avatar
  • 51
-1 votes
0 answers
28 views

I have a Lightning Tree Grid component <lightning-tree-grid> and I would like to make the groups show in bold when grouping by them. See screenshot attached below. Currently Group A and Group 1 ...
Z0q's user avatar
  • 51
0 votes
1 answer
88 views

I followed the instruction present in the website to use FullCalendar - https://fullcalendar.io/docs/initialize-globals . I downloaded the zip file and compressed just the index.global.min.js and ...
SfdcBat's user avatar
  • 4,759
0 votes
0 answers
23 views

In aura component <lightning:map mapMarkers="{! v.mapMarkers }" markersTitle="{!v.markersTitle}" /> Js : mapMarkers.push({ location :...
Fark's user avatar
  • 45
1 vote
0 answers
40 views

@wire(getNearbyAccounts, { accountId: '$recordId' }) wiredAccounts({data, error}) { if (data) { const baseUrl = window.location.origin; this.mapMarkers = data ....
Fark's user avatar
  • 45
0 votes
1 answer
56 views

I'm using what appears to be a simple Jest test, but when run this test expect(span.textContent).toBe('OK: Test Message'); it fails even though the strings are equal. Here's the test it('should ...
John Thompson's user avatar
0 votes
0 answers
39 views

I am following this article which lauches the Tableau Viz from a Lightning Web Component - Tableau Insights Delivered Directly to Salesforce with Dynamic Data Security This uses Tableau Embedding API ...
Prakhar Saxena's user avatar
1 vote
1 answer
51 views

When I define the value for my @api-annotated method, the value shows up as empty ([]) on the test. For example: const element = createElement('c-my-modal', { is: MyModal }); element.listProperty = ['...
Renato Oliveira's user avatar
1 vote
1 answer
69 views

I’m building a LWC that uses to edit an Account__c record. I need to run all of its built-in client-side checks (required fields, data‐type and length validations, etc.), but I do not want to ...
Jeff Chan's user avatar
0 votes
0 answers
64 views

I'm getting duplicate API calls on a cloud page that uses http post method. User clicks a button in a previous page and lands on the page with the below code. Here's the code I use: var url = ...
Tyrath's user avatar
  • 1
0 votes
0 answers
34 views

I created a method that opens Screen Flow for me. The script is below. window.sforce.opencti.screenPop({ type: window.sforce.opencti.SCREENPOP_TYPE.FLOW, params: { flowDevName: '...
Kamil G.'s user avatar
1 vote
1 answer
271 views

Im writing an LWC that generates emails using context of current Case using prompt builder. Im done with the part till getting the G=generated email into the LWC, and I want to be able to click on ...
Shri Vignesh S's user avatar
0 votes
0 answers
28 views

I have implemented a div in html file and calling the js function using the onclick event as shown below. how to cover 'onclick={handleShowMoreClick}' through jest? Every time I am getting error ...
Ravi SFDC's user avatar
0 votes
1 answer
119 views

How to apply sticky header to the Lightning Tree Grid component? I was trying to use position: sticky; on the <thead>, but no luck so far. I also tried multiple other things including using the ...
Z0q's user avatar
  • 51
0 votes
0 answers
30 views

I am trying to use Third-Party JavaScript Library Swapy in a LWC. but I get error on the load script <template> <div class="list-container"> <ul id="swapy-list"&...
Raphael D's user avatar
  • 644
0 votes
1 answer
388 views

We need to generate a pdf with several tables in LWC with custom styling from multiple objects and also embed dynamic images(using base64). We can achieve all of it using VF page, except for embeding ...
user5352's user avatar
  • 1,741
0 votes
0 answers
27 views

We have a Mobile Publisher app and a LWC in it. Our LWC needs to open a telephone number in the dialer on button click. The following Javascript code, however, throws the error Window.open supports ...
dev4life's user avatar
  • 709
0 votes
1 answer
92 views

For grouping I use <lightning-tree-grid. I would like to add Pagination for children when groups are expanded. Currently I have pagination for the first level only. Let's say I have: Group A (11 ...
Z0q's user avatar
  • 51
0 votes
1 answer
82 views

I have been running in circles with trying to figure out how to send pardot a tracking post, but at the same time complete my regular registration form in my ASP.NET webpage. I cannot use, or pardot ...
Robert Koernke's user avatar
0 votes
1 answer
94 views

I have a Lightning Web Component (LWC) deployed in an Experience Cloud site that allows users to view reports filtered by a project name. The component is placed on a project record page (object: ...
Chandrasekar M G's user avatar
1 vote
1 answer
117 views

Problem statement I have an LWC component that display list of contacts. Upon selecting a contact, there is a child LWC component that loads records from its related record- custom permissions (a ...
Mahmood's user avatar
  • 6,038
0 votes
0 answers
33 views

I'm trying to use SSJS in a Script Activity inside Marketing Cloud Automation Studio to retrieve lead data from Salesforce using the REST API. I've confirmed that the credentials and API call work ...
Rosalyn Grohol's user avatar
0 votes
0 answers
58 views

Has anyone moved from AWS JS SDK V2 to V3? I'm trying to do it. Used webpack to bundle client-s3 and s3-request-presigner. Uploaded that as a static resource. Used the following to load it import { ...
Vedant Gupta's user avatar
0 votes
1 answer
184 views

So I have a FlexiPage with a ListView of Service Objects and a Flow. Now I want to keep the ListView as the original SF Listview but the flow I would like to move behind a button and inside a popup. ...
Z0q's user avatar
  • 51
0 votes
1 answer
71 views

I created this custom LWC. When user updates and saves Specialty on the EA Record Detail Page, I need my Compensation LWC to refresh the data. I have tried a number of things, but every time I have to ...
Ryan McNeely's user avatar
0 votes
1 answer
45 views

My requirement is to display the question records based on datatypes which were stored in a custom object as records & capture its responses as well . I was able to retrieve & render the ...
Rv1's user avatar
  • 766
0 votes
0 answers
16 views

I'm trying to force a CPQ calculation with Apex, but on the QCP I'm using the LocalStorage for another functionality, so when the calculation gets triggered from Apex, I'm getting an error that says ...
Juan Ignacio Carreño's user avatar
0 votes
0 answers
59 views

I need to build a hierarchichal table that shows records from customObject__c as parents and as childs records from the same customObject__c that are related through lookup field_A. The fields from ...
Alejandro Martínez Infante's user avatar
1 vote
1 answer
95 views

To display the first name of a member in the first column of my <lightning-tree-grid>, I am using type url to make it clickable, navigating to its record. { label: 'First Name', fieldName: '...
Z0q's user avatar
  • 51
1 vote
1 answer
174 views

How do I make the Tree Grid rows clickable and navigate to a record using the ID? In this example page, I can click on the object name to open its record. What I would like to see is a possibility to ...
Z0q's user avatar
  • 51
0 votes
1 answer
60 views

The <lightning-tree-grid> implements a padding on the left side of the first column. The other columns do not seem to have this padding. Is there a CSS property or an HTML property that I can ...
Z0q's user avatar
  • 51
0 votes
0 answers
144 views

For <lightning-tree-grid> I have some columns defined. In one specific column I would like to use custom formatting, using HTML, and another column variable. I am trying to add a green label ...
Z0q's user avatar
  • 51
2 votes
1 answer
577 views

I am using a lightning-modal and having a hard time getting it to scroll at all. I'm using pretty simple markup, similar to the docs. <template> <lightning-modal-header label="My ...
Adrian Larson's user avatar
  • 153k
0 votes
1 answer
168 views

My LWC has an LWC:if / else condition in the HTML, but the condition is not determined on the initial load so it loads the default. When the js runs through all the code and the condition result is ...
Irene's user avatar
  • 2,005
0 votes
2 answers
130 views

How do we format currency value to look like this I'm displaying the value with 3 decimals currently, but the ask is to move the third decimal like the format above. I tried following code but didn't ...
Anurag's user avatar
  • 2,266
0 votes
1 answer
52 views

I have pagination buttons which look perfectly aligned on the browser, but when seen on the mobile application it loses the alignment. I want to make it responsive using slds properties. Below is the ...
SFDC Learner's user avatar
1 vote
0 answers
37 views

Is there a new setting for serving LWC components in developer/debug mode? I have this LWC with a simple button and handler method with the Javascript debugger keyword, which I've used on so many SF ...
Jan J's user avatar
  • 2,704
1 vote
1 answer
73 views

Our product page is pulling related records (lookup relationship) in a lightning table. There's no other customizations on the tab showing related records, but its over 4-5 sec to load the data. Data ...
Rohith's user avatar
  • 41
1 vote
0 answers
41 views

I have noticed in Spring '25 that legacy Aura code that is invoked from a button click that leverages the method event.target.getAttribute does not work anymore. However, in Winter '25 sandboxes, this ...
Andy Hitchings's user avatar
1 vote
0 answers
46 views

I hope you can help me find what I'm doing wrong here. I have an apex class where I get every Case of the current user account, but I need to also fetch Task (tasks with specific subjects and states) ...
kat's user avatar
  • 15
0 votes
0 answers
194 views

In lightning-datatable, the freezeColumn feature is not available. I attempted to use a custom Lightning datatable, but I wasn't sure how to implement it effectively. As an alternative, I implemented ...
Afrose ahamed's user avatar
0 votes
1 answer
85 views

I'm trying to get every Case (and its related objects) of the current user, to show all that data on a LWC. I'm having problems with the apex class. I know the concept of a wrapper, but I can't get it ...
kat's user avatar
  • 15
1 vote
1 answer
101 views

I'm trying to bypass apex limits when trying to get the base64 content of a content document Sample code below fetchFileAsBase64(contentVersionId) { this.isLoading = true; this.error = ...
dragonman1677's user avatar
1 vote
0 answers
69 views

I am using Quill.js library as a rich text editor in my LWC for it's mention capabilities. However after LWS enablement in my Org, many features stopped working (example, one of Quills internal ...
Brav's user avatar
  • 847
0 votes
0 answers
261 views

I'm trying to make markdown js work in LWC but haven't been able to do it. I keep getting the below error from browser markdownPreview.js:1 Uncaught (in promise) ReferenceError: marked is not defined ...
Sharat's user avatar
  • 1,079
0 votes
1 answer
525 views

I could really use some help here trying to get Full Calendar 6.1.15 to run in a LWC; I have Full Calendar zip loaded as a resource in my sandbox: Name: FullCalendar MIME Type: application/x-zip-...
Andrew Day's user avatar
-2 votes
1 answer
54 views

I am unable fetch the base url using window.location.hostname due to LWS being enabled in the sandbox. If LWS disabled it workings fine. Any solution would be much appreciated. alert(window.location....
Parwej Khan's user avatar

1
2 3 4 5
113