9
votes
Salesforce Files for massive storage
There are three main considerations: the cost, the technical limits, and the lead time.
Adding anything with salesforce.com typically requires a contract to be signed every time you do anything. So ...
6
votes
Accepted
New to LWC... trying to implement Google reCAPTCHA and am struggling to figure out how to call a function from connectedCallback
document.addEventListener("grecaptchaVerified", function(e) {
Should be:
document.addEventListener("grecaptchaVerified", (e) => {
When you use a normal function, this can ...
5
votes
Accepted
How to pass URL parameters to a Lightning App page, to load LWC in context of a record?
There is native support for query parameters in LWC. To persist, their names need to have namespace added as a prefix. Default namespace is c__.
In this example:
/lightning/n/MyAppPage?recordId=...
5
votes
Accepted
I am Receiving Error on Formula Number Field
The issue is your minus sign character (-).
I presume you copied this formula from that site and then replaced the fields. It seems the minus sign (-) is actually an en dash instead of a hyphen-minus ...
5
votes
Accepted
LWS - Apparent difference in behavior using data returned from Apex call
Edit: This will be fixed in Spring 22, as confirmed by engineering. The original answer will remain below.
In Locker Service (LS), they use an ObservableMembrane with a readOnlyMembrane within it ...
5
votes
Accepted
LWC: get value of checkbox on change
you need to reference checked for the lightning-input checkbox
For input types checkbox and checkbox-button, the value of checked
attribute.
handleTodoChange(event) {
this.value = event.target....
4
votes
How to pass URL parameters to a Lightning App page, to load LWC in context of a record?
For persistence, I would recommend using location history hash also known as a fragment identifier
it can easily be added by accessting wht browser's location object:
location.hash = 'your hash'
. ...
4
votes
Accepted
Can you pass in a string collection into a flow using a URL?
In order to init a collection variable with multiple values, it is necessary to specify the same URL parameter multiple times, for each of the values.
For example:
/flow/Test_Flow?recordIds=...
4
votes
Accepted
this.querySelector || this.getElementsByClassName not working in LWC OSS
As described in Access Elements the Component Owns you should use the template property e.g.:
const banner = this.template.querySelector('.banner.error');
4
votes
Scheduled Triggered Flow
As per the article by default the Automated Process user runs schedule-triggered flows.
Now you can specify the default workflow user in your org’s process
automation settings to run schedule-...
4
votes
Accepted
TypeError: Cannot read properties of undefined (reading 'DOB') in for loop
When initializing your for loop to iterate through an array using its length and starting at 0 you need to use < rather than <=.
In your code you have:
for(let i=0 ; i <= this....
3
votes
Accepted
Why does my Quick Action not show up in Lightning Experience?
It could be many things. Below is a general troubleshooting list for a quick action (QA) that doesn't appear on record pages:
Does the user have access to the object the QA is creating?
If it's Log a ...
3
votes
Accepted
Flow Builder not firing up after approval process
This has been incorporated into the API version v54.0. To get the flow to be fired from an approval process update the flow itself needs to be saved in that version or higher.
3
votes
Accepted
Enforce OAuth Scope for Lightning Apps
What you're looking for is within ConnectedApp metadata. If you pull down this metadata type from the metadata API you'll be able to identify your apps. This should be a good first step for you to ...
3
votes
Accepted
Get parent record fields using getRecord uiRecordApi in lwc
you have to use getFieldValue in order to get parent field values
import OPPORTUNITY_NAME from '@salesforce/schema/Opportunity.Name';
import OPPORTUNITY_ID from '@salesforce/schema/Opportunity.Id';
...
3
votes
How can I select More than one option from different radio group buttons in LWC?
For each radio group, name attribute should be unique.
I can make an assumption, that in your case attributes name are the same.
salesforce recommends not to set name, as it will be generated ...
3
votes
Accepted
LMS send multiple message to one component
If you want to use one channel, you'll be limited to one handler that will then have to dispatch to other methods based on the contents of the message. Using multiple channels would probably make the ...
3
votes
Accepted
Use id in aura:iteration for recordEditForm
aura:id can't be set dynamically via an expression. It is mentioned in the Component IDs documentation.
aura:id doesn't support expressions. You can only assign literal
string values to aura:id.
at ...
3
votes
Accepted
detect in which page a lightning web component is
Salesforce will automagically supply it to your parent component. You will need to pass it to your child components as a parameter.
import { LightningElement, api } from 'lwc';
export default class ...
3
votes
Accepted
LWC wire function wont acknowledge my controller property
Consider using arrow function => instead of function itself.
In regular functions the this keyword represented the object (function, object and function are the same in js) that called the function....
3
votes
Accepted
How many flow interviews can I run per transaction?
I don't know of a specific limit for the number of flows you can run in a single transaction, but flows are limited by a variety of limitations, such as CPU time out (10/60 seconds), SOQL (100) and ...
3
votes
Convert integer to a binary value
You can use any existing algorithm and implement it in the apex. For example
public static String intToBinary(Integer n) {
String s = '';
while (n > 0)
{
s = ((Math.mod(n, 2)) =...
3
votes
Accepted
Imperative Apex Flattening Limitation?
For imperative calls, there is no "data" or "error". If you get data, you get to the .then block, otherwise you hit the .catch block.
.then((result) => {
this....
3
votes
Accepted
LWC and export module this context
You can specify this using Function.prototype.call:
showToast.call(this, 'Warning','blaaaa','warning', 'dismissible')
Or by binding before calling:
showToast.bind(this)('Warning','blaaaa','warning', '...
3
votes
Accepted
lwc not supported on app page (mobile)
In order to support mobile on record page you just have to add <supportedFormFactor type="Small" /> to the related supportedFormFactors section:
<targetConfig targets="...
3
votes
Accepted
How to refresh the Parent component after a button on child component is pressed?
The child should notify the parent via an event:
// child.js
async handleClickedSave(){
//custom event to send to parent to show View Screen with Apex callout
await sendUpdatePayloadToApi({params:...
3
votes
Access LWC via URL
Short answer: No.
LWCs are not URL Addressable (unlike Aura components that can be).
You would have to create a page and drop the LWC into that page, then reference the page by URL (not the component)....
2
votes
Refresh the page after the flow completes
Unfortunately, the UnofficialSF solution didn't work for me, but was able to get a similar solution working.
Similar to the UnofficialSF component, add the following aura component to your flow where ...
2
votes
Refresh the page after the flow completes
Yes, you are not able to trigger the action for the Update Screen from an auto launched flow, but a workaround is to create a Screen Flow with just 1 action for the Update Screen and nothing else. ...
2
votes
Accepted
Clear data from SalesForceChat
I'll answer my own question in case anyone finds this post.
It's not a reliable solution. It's a hack. Not even sure it works all the time - but we had enough success with it to ship it "in lack ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lightning × 6450lightning-aura-components × 2986
lightning-experience × 873
lightning-web-components × 782
apex × 645
javascript × 533
visualforce × 431
lightning-design-system × 395
lightning-apps × 370
aura × 337
community × 291
css × 148
slds × 119
locker-service × 116
visual-workflow × 113
lightning-datatable × 107
lightning-community × 105
salesforce1-app × 95
javascript-controller × 91
lightning-events × 89
controller × 83
quickaction × 75
salesforcedx × 73
custom-button × 71
page-layout × 68