New answers tagged

0

To increase the size of the lightning-file-upload, the inbuilt CSS classes need to be overriden. The only way to do that is through a CSS uploaded as a static resource. To add the css through static resource: In your JS: import { loadStyle } from 'lightning/platformResourceLoader'; import customStyle from '@salesforce/resourceUrl/customStyle'; export ...


0

List is nothing but an array in JS, so you can assign an empty array to the attribute. Like below. component.set("v.chkRecords", []);


0

The documentation for lightning-datatable has the information for what's available. There's nothing that will automatically move something from one table to the other - you essentially will be doing that. The component provides an event onrowselection that allows you to get selected row data and then you need to add that information to whatever variable/data ...


0

It looks like have been asked already https://salesforce.stackexchange.com/a/299383/13583 Currently there is no possibility to do it. You can vote for this idea which is asking for that functionality.


0

The easiest and in fact a better practice is to combine all these resources into a single changeset, instead split into two or a few changesets (Usually, one would keep all the dependencies in the 1st change set, like profile/object/field creation etc, and then have 2nd changeset that refers these items). Of course, having too many changesets, may trigger ...


1

For Aura components, you have isURLAddressable which you can implement. Example code is taken from the documentation <aura:component implements="lightning:isUrlAddressable" description="c:helloTarget component"> <aura:attribute name="id" type="String" /> <!-- Add an "init" handler to ...


0

One approach: Custom button updates Contact record with a custom field called Add_to_Campaign_Scheduled_Action_Reference_Datetime__c. This field is coerced to always be a value from 2000h-2359h of the same day that the button was clicked Coercion can be done via a Flow or, perhaps more easily with a trigger. You can spread the values out across the 240 ...


0

You can use the built-in validation logic of the lightning:input component. There is a max attribute on the lightning:input component in which you need to provide the max date value in the YYYY-MM-DD format - documenation. To get today's date you will need to use the JS Controller - on init of your component call function to prepare today's date in the ...


1

Salesforce does not guarantee all file types and their contained features will properly generate previews in Content. Please refer this doc detailing the limitations of Content file previews. Limitation around PDF files Large numbers of pages. Exact number is dependent on their content but if the count is high (100+) it may cause the preview generation ...


2

make sure your static resource is public... also try putting console log and verify if this.contactList is having value in proper format. JSON.stringify(this.contactList) should give the result as [{"Id":"A","FirstName":"B","LastName":"C"},{"Id":"D","FirstName":"E&...


0

You've misunderstood the example. What you're looking at here is a Package that has the name "New Opportunity Page" and includes one element, the FlexiPage called New_Opportunity_Page. If you have multiple FlexiPages, you can deploy them all at once. The UI will also show this as a package that can have components added/removed, and downloaded as ...


0

I think the best way is to remove the modal and use a lightning:card instead. try this code <aura:component> <lightning:card title="Cancel Order"> <p class="slds-p-horizontal_small"> Are you sure you want to cancel this order? </p> <aura:set attribute="footer"> <lightning:button name='No' ...


0

You'll have to use slds html directly and use lightning-help-text base component inside the header tag instead of the lightning base component and edit the way you want it.


1

You can access the Helptext in apex using - String helpText = SObject.FieldAPIName__c.getDescribe().getInlineHelpText(); replace sobject name and field api name with the object and field for which you need the help text.


0

That field does exist: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceappointment.htm If you add a custom field, it will get ignored and will not add any value in the final saved appointment. However, if you set value in the assignment stage for this standard field, it will get saved to the ...


0

What is the relation from your custom object to Order? You either need a custom report type to add it via relationship, or you can create a formula field to pull it over to the Order level. The best way to solve this depends on how these objects are related, though.


0

I have a similar setup as Anonymous mentioned in the original question. The flow renders the "Next" button, however, the content of the screen of the embedded flow is not shown. Also, when I click on "Next" button following error is thrown - This page has an error. You might just need to refresh it. Action failed: flowruntime:...


0

This behaviour(Hide Option to Switch to Salesforce Classic is not working as expected) is been documented in the help article. It's been observed that, when a user profile has the permission "Hide Option to Switch to Salesforce Classic" enabled, the user still has the option to switch to classic from the Avatar Menu. Make sure these 3 permissions ...


0

As per this article, you will have to contact support for assistance Check the User's profile if the "Hide Option to Switch to Salesforce Classic" permission is enabled. If the permission is not enabled, please contact Salesforce Support for assistance.


1

You cannot remove Role, Role and Internal subordinates options, as these are standard salesforce button functionality with Manual sharing. Check custom button manual sharing examples here 1 , 2 and see if that helps you. Thanks


0

You can try with the below line of codes. < input type="checkbox" id="news" value= "news" checked={!v.identityRequest.Newsletter__c}" onchange="{!c.onChange}" /> onChange: function(component, event, helper) { var check = document.getElementById("news").checked; alert('check ::'+check ); ...


0

c.Child is the incorrect component name, it should be c:Child. The reason why is because of XML and how names are defined. The <x:y> syntax means "the component y in the namespace x," while <x.y> means "the component x.y in the default namespace." As you can hopefully see, these are two different definitions, and should yield ...


0

I do not think you can access the component's children like this and according to the documentation you cannot apply custom styling for the tooltip content in lightning-helptext using --sds-c-tooltip-* You can only change the styling of the button <lightning-helptext content="Size (width x height x lenght)" class="newColor"></...


1

You could use binding: Define an attribute called dashboardLinkClass <aura:attribute name="dashboardLinkClass" type="String" default="active"/> reference that in your link: <a aura:id="Home" href="{!v.status}" class="{!v.dashboardLinkClass}" alternativeText="DASHBOARD" ...


1

To open the tab using hyperlink, you have to make changes in your column and in your js method where you are getting the data to show in the table For example: In column, to display the hyperlink you need to specify the type= 'url' and some attributes under typeAttributes so that we can display the text we want to display instead of url link. const COLUMNS = ...


0

You can add the same field in multiple filter with different values (single value only) and use the Custom Filter logic to handle your requirement. For Example. Case Object having 3 available record types and I want to display the button on any 2 record types only.


0

You can make use of focus() method available in lightning:input/select You can use: var allValid = cmp.find('field').reduce(function (validSoFar, inputCmp) { //inputCmp.reportValidity(); **inputCmp.focus();** return validSoFar && inputCmp.checkValidity(); }, true); Then reset the focus to appropriate field and you'll see the all errors listed ...


0

I apologize to everyone, I really do not know what fixed it but it fixed itself. I have no idea what did it. I even created another org just to recreate the problem though I failed and so I decided to run the application again, then suddenly it showed the records and their names.


0

Add lightning:isUrlAddressable interface to the component. And also add a "change" handler to handle all changes to the "v.pageReference" value. Link to Documentation: https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation <!-- Add an "init" handler to handle the first "v....


0

What you can do is, while selecting row for the first time, you can save them in an attribute. Say , selectedRow. When you are deselecting or selecting row again then you can check which previously selected field is deselected by comparing selectedRow with newly selected rows For example: handleSelect : function(component, event, helper) { var ...


0

I think when you are setting the attribute value you need to provide the value provider i.e. component.set("v.isNewEnabled", true);


1

This seems to be a bug to me, wherein only country is not marked required. But if you want to mark only some fields required from the address component, you can remove the required attribute from the lightning-input-address component in html file and instead use setCustomValidityForField method in the JS. You can find the documentation of this method in the ...


0

You can check the support for a given JavaScript API on the Locker API Viewer. Unfortunately, searching for "SpeechRecognition" returns the following (source is SecureWindow): API Support webkitSpeechRecognition Not Supported webkitSpeechRecognitionError Not Supported webkitSpeechRecognitionEvent Not Supported


2

The source code for the standard templates is not public. You can inspect elements on the browser but it is hard to decipher. Creating your own templates is simpler with lightning-layout. There are a couple of examples in the sample app Easy Spaces. 3:9 layout 4:8 layout A sample component for 4:8 will be as below <aura:component implements="...


0

I managed to do this by creating a css file with the following content: .slds-popover_tooltip, .slds-popover--tooltip { background: #477626 !important } Next, load the static resource in my component con ltng:require and it worked correctly for me both in Salesforce and in a Lightning Community.


0

That's expected. Parsing values from the URL will always be a string, as the data type isn't encoded in the URL parameter. They are numbers only when they don't end up going through the URL (e.g. when used in NavigationMixin). You should always use parseInt/parseFloat before using a (potentially) user-supplied value from the URL, if you're expecting a number ...


1

this.itemStatus.itemInStock = true; this.itemStatus.itemNotInStock = false; You can't do this. Marking an object as @api means that you expect it to only be set by the parent, and you should not presume that you can make any changes to it. In addition, I'd like to note that your component can't respond to changes to the internal state of the variable, ...


0

There is a limit of 5 community apps and 1 internal application. You can raise a case with support to get it increased. There might be a cost involved. Unfortunately once an app is created, it cannot be deleted to free your license limit.


0

Recently we faced a similar issue, although our limit was 10 apps. Anyway you can open a case to Salesforce support to ask them for increasing your limit


1

Workers are not supported in LWC/Aura (see Locker API Viewer), because they are a security risk. As such, this lib won't be compatible unless you eliminate the possibility of loading the worker. Note that this only applies to Salesforce LWC, if you use a Visualforce or Lightning container, you'd be allowed to use this library, but you'd lose most of your ...


0

You will need a simple lightning component with a link and action like below appNav.html <template> <lightning-button variant="brand" label="App A" title="App A" onclick={navigateApp}></lightning-button> </template> Controller code appNav.js import { LightningElement} from 'lwc'; import { ...


1

It is solved! Thanks for comments. <template> <div class="example"> <lightning-spinner alternative-text="Loading" variant="brand" size="large" ></lightning-spinner> </div> </template> .example{ position:relative; --lwc-brandPrimary: rgb(218 35 54); height: 80px; }


0

To achieve that you can use combination of Platform Events + empApi. You need to define Platform Event in setup. Platform event can be send from apex (so in your case trigger), flows and process builders. To receive that event you need to use empAPI in your LWC. Copypaste from the documentation: import { LightningElement } from 'lwc'; import { subscribe, ...


0

You can't display different field columns per nested object, so the lightning-tree-grid is ideally used to display a hierarchy of similar objects (e.g. an account hierarchy). You could rather easily build your own component, but the standard component isn't well-suited for what you're trying to do.


0

I created a new button on the Account object to create the contact which prepopulate the Account look up. The Custom Account Name field is a custom look up field for the account object. See if this helps for you.


0

I have faced the same issue recently, I did try to change the Lightning App Tab to a Lightning Component Tab. But this will restrict us from editing our Lightning App Page via the Lightning App Builder. Instead, I created a custom LWC for that, whereby in my component I'm hiding the standard banner on the lightning app page. .slds-page-header.flexipageHeader ...


0

You can send params to Asynchronous Aura Method just like Synchronous. And your syntax is absolutely correct. Please check if your Attribute has any value or try hardcoding param's value and log it in your child component. Out of curiosity I tried this and its working. Child Cmp: <aura:component > <aura:method name="childmethod" action=...


Top 50 recent answers are included