New answers tagged

0

I am not sure but seems like there is no alternative for now.. There is an article with the details: https://help.salesforce.com/articleView?id=000315141&type=1&mode=1 Hope this helps!!


0

So, you want to store data not in a table(Dirty object) on server side. Had it been client-side, I would have recommended, cookies for <4KB, or Local Storage for up to 5MB storage. But you want to store in server-side, so that its browser and device-independent as data is fetched from the server. I would look into Session Platform Cache. You can set ...


1

If your org uses record types, picklist fields display values according to your record types. You must provide a record type ID using the record-type-id attribute if you have multiple record types on an object and you don't have a default record type. Otherwise, the default record type ID is used.


3

You've got a lot of problems with this code, mostly due to a lack of bulkification (meaning, the code should work right with multiple contacts). You need to use after-insert/after-update instead of before-insert/before-update, otherwise your query won't return the correct values. Further, you need to determine which account matches the contact. Here's a more ...


3

Your logic simply doesn't do what you're aiming to do. List<account> acc = [select id, (select id, contact_status__c from contacts where contact_status__c = true) from Account WHERE Id In: accID]; Here, you query the Accounts of all Contacts in the trigger set. for(Contact c : trigger.new){ if(acc.size() == 0 ) { c.addError('You are ...


0

I would recommend using session cookies to have items in the browser. https://www.allaboutcookies.org/cookies/session-cookies-used-for.html There is a good answer on SFSE already: https://salesforce.stackexchange.com/a/270327/55914


0

I know this old post but my answer may help others as well. Recently I have implemented File Upload into AWS S3 using Salesforce LWC leveraging AWS SDK. Here is the link of my blog post <!-- fileupload_aws_s3bucket.html --> <template> <lightning-card variant="Narrow" title="AWS S3 File Uploader" style="width:30rem" icon-name="action:...


0

If this form is created by you, then you can hardcode the id for this element(make sure its unique in this html page) If this is not your form, try to getElementByTagName('input') this will give you can array of elements check which element has attribute of type=tel. This is your element. Example getElementByTagName('input').forEach(function(eachElement){ ...


1

See below piece of your code:- const tileclickByUser = new CustomEvent('tileClick',{detail:this.meetingRoomInfo}); this.dispatchEvent(tileclickByUser); The custom event name in Lightning web component cannot be in uppercase. You have named it:- tileClick where C is in uppercase. You should name it tileclick to make it work correctly. The CustomEvent() ...


1

Your helper method named createContact is causing the issue. createContact: function(component, contact) { //valling the method and storing it in variable called theContacts var theContacts = component.get("c.saveContact"); // you should use theContacts.setParams instead of action.setParams action.setParams({ ...


1

In the Experience Builder, there's a page called, "Record Detail". Drop a custom lightning component anywhere on that page that will redirect your users where you want them to go. You'd use the init handler on an Aura component or connectedCallback in an lwc. A down and dirty Aura component could look like this. myRecordRedirect.cmp: <aura:component ...


1

I know you say that you want to move this code into a trigger, but my intuition would be to create a @AuraEnabled method on the current apex controller, separate out the code that calls the soql/dml and then call that code from either the controller constructor or from the @AuraEnabled method. For example: Apex: public class sotestcontroller { public ...


0

We can use Array.prototype.map to get to an Array<Array<Object>> from Array<Object<Array<Object>>>, then Array.prototype.flat to get an Array<Object>. Here's what that looks like: var allValues = response.getReturnValue(); var allContacts = allValues.map(acc=>acc.Contacts).flat(); var allOpps = allValues.map(acc=>...


0

thanks for the help and advice i got to the bottom of it, in summary we were using the wrong aria control !! aria-controls="{!PQs.AnswerID + '-listbox-searchresults'}" should be ariaControls="{!PQs.AnswerID + 'LkupRslt'}"/> the whole piece looks like this <lightning:input id="{!PQs.AnswerID}" ...


0

Everything in my original post is fine except for... name in the handler (on Parent .cmp) <aura:handler name="RowsPerPageEvent" event="c:RowsPerPageEvent" action="{!c.rowsPerPageChange}"/> did not match name in the registerEvent (on Child .cmp) <aura:registerEvent name="RowsPerPageEventChange" type="c:...


1

I verified that bypassing the import statement and plugging the external object's name (or the object.fieldName) directly into the wire call solves this problem. I got it to work for both getObjectInfo and getPickListValues. Thanks @blastocyst.jones!!


0

You should be able to define a page layout that has VF section that redirects to your home page when the page is loaded. This should still work in Lightning/Communities as it would display the VF in an iFrame. Then you just assign that layout to your community users.


0

i observed your code used aura:renderIf i am Not sure if this would apply in your scenario in iteration , but have you tried using aura:if instead of aura:renderIf? because library doc. it's Deprecated. Use aura:if instead. This component allows you to conditionally render its contents. It renders its body only if isTrue evaluates to true. The else ...


0

Shadow DOM won't allow you to modify the inside of a standard component from its parent so you won't really be able to directly do this even though it'd be as simple as adding position:absolute;right:.5rem to that icon... You can just rebuild this either in a custom component or just in that component as HTML with the open source SLDS code as seen here You'...


0

Okay I felt bad we weren't able to solve it yesterday, so I went and created a mock of your components in a dev box. I have the event firing, listening, and logging on both ends properly. Here's the code: Parent.cmp: <aura:attribute name="quanitySelected" type="String" default="0"/> <aura:handler event="c:RowsPerPageEvent" action="...


0

It's fixed - I made no changes at all so I guess it's the Salesforce fairies that I need to thank :-)


2

I feel you may be approaching this from the wrong direction. Lightning, by default, encodes all unsafe characters so you don't accidentally get XSS injections. There's ways around this, but I'd say you can probably just use CSS instead. formatString: function(component, event, schemes) { schemes.forEach(scheme => scheme.RequiredFromClientMain__c = ...


1

This is due to a security measure that prevents HTML injection. You should use aura:unescapedHtml to render HTML but make sure that your source of data is safe: https://developer.salesforce.com/docs/component-library/bundle/aura:unescapedHtml/specification


0

I created a new Dev org and Service Setup is available in the org. Looks like it's not available for old orgs. When I edit a Console App in newly created org, I can see Setup Experience setting under App options. This setting is also missing in old org.


1

I recommend to use the new Lightning Message Service (Beta as of Spring '20) as it's specially designed for that purpose.


0

For first case (Standard Action Override (new)), where just disconnected callback run on second redirect to that target, fix was easy. wrap LWC component with div or any element: <div><c:lwc_component><c:lwc_component/></div> NOTE: there is possibility to run eval("$A.get('e.force:refreshView').fire();"); on disconnectedCallback but ...


1

You have to change URL from var urlStr = 'lightning/setup/Queues/page?address=/p/own/Queue/d?id=00GXXXXXXXXXXXX'; to var urlStr = '/p/own/Queue/d?id=00GB00000042vpz&setupid=Queues'; It worked for me


0

Can you try salesforce standard report solution and try export it : https://help.salesforce.com/articleView?id=reports_export.htm&type=5


3

It is not possible in standard configuration. As per your requirement you have to override the standard View functionality. I am explaining a workaround where you will achieve close to the requirement. What you have to do, create a Lightning Component place it in the Account detail page and show the Modal Popup in the init method using lightning:...


0

I finally figured this one out! It had to do with not showing enough code in my initial example as I can guarantee someone would have spotted it. Here is the code I was working from - <div class="slds-truncate" title={attrib.value}> <template if:true={attrib.allowOverrides}> <template if:true={attrib.isPicklist}>...


1

There is no way you can create lightning record pages for reports in the Lightning app builder. reports are built-in report builder instead of lightning app builder. Reports represent a report, a set of data that meets certain criteria, displayed in an organized way. Access is read-only. This object is available in API version 20.0 and later.


1

I have replicated your issue in the builder screen (wide section): In the builder on the narrow section it actually displays well: However once I was actually on the full page after saving it displayed properly (wide section) The narrow section on full view also displays as it does in the builder. Mobile also appears to work Is your image from the ...


0

Problem seems to fix itself after restarting / reconnecting / re-logging in. If that still doesn't work, contact support.


1

You can create a queue and add required users who are eligible to submit for approval. This queue can be added as Initial Submitter during Approval Process configuration.


0

You need to check which radio button is checked using document.getElementById('NewX').checked and then add or remove required attribute from input field, on click of submit button when saving the form. For Example : if(document.getElementById('NewX').checked){ document.getElementById('NewXName').required = true; document.getElementById('XSearchBox')....


0

if you are looking for a solution where both related list for activities and activities component should work in parallel, yes it is possible. Salesforce has given you a standard component called Related List Single. All you need is to add related list single component to Lightning page layout using Lightning App Builder and select Open Activities in ...


1

Yes, you can add a Screen Flow component to the relevant Opportunity Lightning Page(s) and make the component conditionally rendered by using the "Set Component Visibility" option on the Lightning Page from App Builder. See below: If you wanted to spice things up and make the option/prompt to create a quote more obvious by having it pop up in a modal, you ...


0

According to docs, lightning:listView supports the following features: Inline editing Mass inline editing for single record types Resizing and sorting of columns Search Text wrapping Loading of additional rows You can configure inline editing. Other features aren't configurable. Additionally, the following features are not supported via the ...


0

i dont think we have any lightning:input with type attribute as "StartDatetime " we have "datetime" which can be use to set the timezone. <lightning:input type="datetime " name="input1" label="Start" required="true" value="{!v.StartDatetime }" timezone ="GMT"/>


0

Record pages are not stored as part of the CustomObject entity. To retrieve Lightning Record Pages, retrieve the FlexiPage entity (along with any custom components used). To retrieve Page Layouts, which dictate some elements of the Lightning Record Page (such as the content of standard Related Lists components), retrieve the Layout component. In both ...


0

If you are uploading the SLDS files to support Visualforce development, such as creating a Visualforce Page (VFP) for a Force.com Site, you can just reference the SLDS tag in the VFP: <apex:page > <apex:slds /> // addition page apex/html markup </apex:page> Check out: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/...


1

The blog post Evergreen: Serverless Functions & Compute for Customer 360 Platform you link to says: A limited access developer preview of Evergreen will be available with the Spring ’20 release in February. A starting point to get on that (so you can try Evergeen out) may be the sign-up link that immediately follows. But when/if this feature will ...


1

As a workaround, if you can put the record update into a scheduled action rather than an immediate action, then the email notification will be sent. The minimum time delay for a scheduled action appears to be 1 hour. Being able to create a scheduled action in Process Builder means that you need to: Have your process set to execute only on record creation, ...


0

This issue is related to deploying from a higher api version to lower api version (i.e., API 48 to API 47). You will need to either make the change manually or wait until the API version has changed for the target environment. Please refer to this knowledge article: https://success.salesforce.com/issues_view?id=a1p3A0000003ejPQAQ&title=doc-fix-change-...


0

I ended up using NavigationMixin to resolve this using recommendation from @n30r3b3l. Also removed href={account.Url} myApp.html <template> <!-- other code --> <template for:each={myAccounts} for:item="account"> <div key={account.id} class="slds-col"> <lightning-tile label={...


2

The only thing that comes to my mind and which is pretty easy to implement is to get rid of Related Lists default component on Lightning Page and to add every desired related list in a form of Related List - Single. That way you can keep related lists defined for Page Layout and use whatever related list you want on your Lightning Page.


2

It looks like you are attempting to do an expression evaluation in the markup, which I don't think is supported in LWC at this time. You will likely need to do something like myApp.js import { LightningElement, track } from 'lwc'; export default class App extends LightningElement { @track myAccounts = [ { "Id": "1", "Name": "Abc Inc.", ...


0

As @BrianMiller stated, $A.get('e.force:refreshView') only updates the standard components on the current lightning page. But that's because those components are listening for the event. I was able to get my custom Aura component to refresh when the event is fired by listening for it: <aura:handler event="force:refreshView" action="{!c.doInit}" /> ...


0

First, throw an aura handled the exception of the controller. throw new AuraHandledException('something terrible happened!'); Then handle it in the aura component controller or component if your following best practices. Check if the response state was successful by checking the response state. If there is an error, it will be an array. Due to the aura ...


0

This has now been raised as a Known Issue: https://success.salesforce.com/issues_view?id=a1p3A000000FmjRQAS (Found that information here: Issue with error messages on Lighting:recordform)


Top 50 recent answers are included