New answers tagged

0

With Spring'20 you can now provide the default fields values to the create record form using navigation service. Please have a look to below link which describes your requirement and answer properly - https://livingthetrailhead.com/2020/01/12/navigate-to-a-records/


0

The following is a discussion on this subject from the Partner forums that I started: I am writing a custom LWC, one aspect of which is the ability to create a new record based on the context of that custom LWC instance. The LWC component holds the ID of a parent object. The child (to be created) has a Master Detail relationship back to the parent. ...


0

If you are placing this child's LWC data table on the parent object's (say Account) record page then you can get the parent record's Id in the "recordId" variable like below:- import { LightningElement, api } from 'lwc'; export default class TestClass extends LightningElement { @api recordId; } For more information see here - https://developer....


0

We were getting the same error and it turned out to be a Licence issue. Lightning Page was accessing Object belonging to a package, which User didn't have licence. You don't get any Client-side or Server-side logs to understand that it's an object access issue. Working well for us now.


0

Add this styling on the component. <aura:html tag="style"> .slds-backdrop { background: rgba(43, 40, 38, 0) !important; visibility: hidden !important; } .slds-fade-in-open { display:none !important; } .slds-modal { display: none; visibility: hidden !important; } </aura:html>


0

You should use the lightningStylesheets tag in your page markup: <apex:page controller="myController" lightningStylesheets="{!renderLightning}"> With the renderLightning variable defined in myController class. This will give you dynamic styling based on if the current user is in lightning experience or not. For more information, check out the ...


0

For those who didn't know, Cases behave differently from other objects. The Lightning component that includes the "New task, New event..." is CHATTER FEED. So I solved it, adding the Chatter Feed component into the Case Lightning page. Sorry for any inconveniences, and hope anyone else having this problem gets this as the proper answer. Best


1

You simply use a generic object. For example: export default class myComponent extends LightningElement { @track someData = {tipoConfiguracion: 'some value', modificacionesElegidas: ['value 1','value 2']} // some time later // someFunction() { validaciones({camposFormulario: this.someData }) .then(result => { /* handle result */ }) ....


1

You need to update your CSS selector to .THIS a:link, .THIS a:visited As Brandon mentioned, you need a . in front of THIS (this is a CSS class selector). However, you also need to prefix the second a:visited selector with .THIS to maintain the same scope.


1

EDIT: Thanks to @poz I also learned something new today, you can comma separate tags by making sure to add .THIS after the comma and a space: New proposed solution: .THIS a:link, .THIS a:visited { color: ;/* browser's internal value */ text-decoration: underline; cursor: auto; } Hi I think you just have some syntax issue here: Please ...


0

You can embed the lightning component inside a visualforce page and call a method from @RedOnly annotation by a VF page the values from VF page to the lightning component. PS: Use this approach only when you need to calculate all the data dynamically, like to draw a chart. Otherwise use lazy loading, pagination, etc in lightning.


0

If you are willing to wait until at least Summer '20 for GA, you could use Ligthing Message Service.


2

Generally, you cannot add the URL level(s) (depth) of custom standard pages. When you try to do that you will get the next error Include only alphanumeric characters and hyphens . So you can either Create different Community Custom Pages with different URLs Create different Page Variations and assign them to different Audiences if you want to create ...


1

The items variable's reference is indeed not altered. Consider pushing the items to a separate variable and assign it to your items variable later. Pseudo code: let mappedItems = []; results.map(result => { mappedItems.push({label: result.label, value: result.value}); }) this.items = mappedItems;


0

How to hide a component based on the profil ? Instead of 'Contains', is there a way to '!Contains', to 'Not Contains' ? I was unable to find that way, so I cloned my page and assign depending on the profile -not that satisfying solution.


0

As far as i am concerned, the @track property rerenders when the value changes, in your case, data is an array, so if you sort it or add some elements using array.push() for example, the var value itself does not change as it is a reference. Try using this statement after the for where you fill the items array: this.items = JSON.parse(JSON.stringify(this....


0

Make sure the user have create access to the custom object either through profile or permission set.


0

Make sure the Log A Call action is added to the page layout in the 'Salesforce Mobile and Lightning Experience Actions' section


1

You're correct. You could do this in Classic. There's no way to do this in Lightning as of right now. Please upvote the idea here to support it in Lightning.


2

The LI and UL tags are for lists and will always be displayed in a column, you can easily achieve the desired formatting using a table such as <table> <tr> <td> checkbox1 </td> <td> checkbox2 </td> <td> checkbox3 </td> </tr> </table>


1

There's no way to do that directly in markup. You'll need to massage your data so that the output is correct.


0

To over come this i have used two modals in same component usinf aura:if


0

Managed to get it working. public class UnescalateCaseController { @AuraEnabled public static Case getCase(Id recordId){ Case caseRec = [SELECT Id, Admin_Escalation__c FROM Case WHERE id=:recordId]; return caseRec; } @AuraEnabled public static Case saveCase(Case caseRec){ caseRec.Admin_Escalation__c = FALSE; update caseRec; return ...


1

Javascript doesn't understand uppercase FALSE or TRUE. It should be in small case false and true. Setting caseObject.Admin_Escalation__c = false; should work.


0

Yes, FileReader is supported. Here's a simple Playground example. You can see the available APIs in the Locker API Viewer.


0

Error is pretty straightforward. You don't have "https://ap15.salesforce.com" in the remote site settings for the org making the callout.


-1

This is fairly simple and bit of research by yourself, you could've done it. Below is something I would write in my Validation rule formula: AND(ISPICKVAL(Status,'Joined'))


0

Turns out that the encoding problem was caused by a requireJs script being loaded before the chat-script was loaded. It's listed by SalesForce as a known issue: https://success.salesforce.com/issues_view?id=a1p3A000000BMJ2QAO&title=special-characters-are-not-rendering-in-snap-in-chat-widget Removing the requireJs-script resolved the issue.


0

You have to make a query in doinit method and set the selectedRecord object instance based on result. Add below methods in Helper of CustomLookup clearSelection : function(component, event, helper) { var pillTarget = component.find("lookup-pill"); var lookUpTarget = component.find("lookupField"); $A.util.addClass(pillTarget, 'slds-hide'); ...


1

You are almost on it. While making your 'preparedAsset' object you are using the name of the list 'preparedAssets' instead of 'preparedAsset'(object variable name) Replace your object creation code with below one:- this.data.forEach(asset => { let preparedAsset = {}; preparedAsset.Id = asset.id; ...


0

The reason why forceChatter:publisher did not show tab was because i was using it in custom component. This is an issue in salesforce itself. Here Is the link https://success.salesforce.com/issues_view?id=a1p3A0000008gACQAY


0

You might want to change the line where you are entering into createRecordEvent.setParam as follows. While you are at it also make sure that the Account__c and Contact__c (which I hope are look-ups in your case have appropriate FLS settings as well and the name, case is right. That should do the trick. if(AccountID !="" && AccountID !=null &&...


0

Adobe Connect has a rich API -- why not exploit it? As far as I can see, it is a web services API (not REST API) so you'll need to use these Salesforce resources to help you: Apex SOAP Callouts - an Apex solution Salesforce Outbound Messaging via Workflow rules and Outbound Message Actions Help There are also middleware solutions like Mulesoft, Boomi, ...


1

You should specify the value as an attribute that can be modified. Here's your code, modified: <template> <lightning-combobox name="myLightningComboBox" value={value} onchange={handleValueUpdate} options={statusOptions}> </lightning-combobox> </template> import { ...


0

I have found out that in order to create a new quickaction you must either create a global action or object specific action. Please be aware you will need to refresh your flow in order to view the newly created action ( I initially had kept flow builder open and the new action was not fetched!)


0

Lookup field is a reference field. You can set default value by using AccountId instead of Account.Name. Just change your formula from Opportunity.Account.Name to Opportunity.AccountId


1

This feature will become available in Lightning in Spring '20. From the linked release notes: How: To construct a custom button or link that launches a new record with prepopulated field values, use this sample formula: /lightning/o/Account/new?defaultFieldValues= Name={!URLENCODE(Account.Name)}, OwnerId={!Account.OwnerId}, AccountNumber={!...


1

Every Object is not iterable by default So you need to use for..in with objects. otherwise, you need to convert it into iterable object. For..of The for...of statement creates a loop iterating over iterable objects, including: built-in String, Array, array-like objects (e.g., arguments or NodeList), TypedArray, Map, Set, and user-defined iterables. ...


1

@lambad as requested in comment, here is the result of a test to show that the issue cannot be reproduced. Added simple lightning component (API v.47) into a lightning page called "Custom Chatter Publisher". Note that forceChatter:publisher is of context="RECORD" <aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" > ...


0

Adding my late 2019/ early 2020 experience to thread for others that land here from searching... 'CF' page parameters and the '_lkid': Project for client required solution for a related list (--child junction object). So requirement is override New action on related list. Right now using VF page with a controller. Solution works by assigning APEXPAGE....


1

In your Helper method, you have $A.get('e.force:refreshView').fire(); taking place after the $A.enqueue() method, which effectively means that it executes before the action itself runs. If you're going to use $A.get('e.force:refreshView').fire();, always put it within the successful action execution code. Also worth noting - that e.force:refreshView only ...


3

This functionality is called a "popover". It can be implemented in a lightning component by including <lightning:overlayLibrary aura:id="overlayLib"/> in your component markup. Here is a sample code from Salesforce documentation, further details in chapter "Popovers" MyCmp.cmp <aura:component> <lightning:overlayLibrary aura:id="...


1

As tugce mentioned, an object-specific quick action will allow you to launch a screen flow by pressing an action button on a Lightning Record Page. Make sure there is at least one active version of your screen flow, and add the action to the relevant page layout of course.


1

GETRECORDIDS() does not seem to work with URLFOR calling a lightning component. There is an alternative using a Visualforce page that in turn calls the lightning component, here is the procedure for account list view: Create a visualforce page of type standard list controller In visualforce constructor method, retrieve list of selected records in list ...


0

I am not sure what but this function in the JS worked. @wire(getClosedActivities, {groupId: '$recordId'}) activities({error, data}) { if (data) { let nameURL; this.accounts = data.map(row => { nameURL = `/${row.accountId}` console.log('name url = ' + nameURL); return {......


1

Content Preview window provided by Salesforce only works for limited filetypes The content details page provides document details at a glance, including document title, author, description, tags, libraries, comments, votes, versions, subscribers, and downloads. If the document is a Microsoft PowerPoint, Word, Excel, or Adobe® PDF file, you can preview the ...


1

As far as I know, we cannot use {!GETRECORDIDS($ObjectType.Account)} to redirect to a Lightning component via URL. There is another alternative using a Visualforce page, whereby the VF processes the selected recordids from list view then redirects to the lightning component. Hope this helps See working example below for account object Visualforce page &...


2

The pop-Over field comes from Compact layout in Lightning. It picks the first five fields. See the below image of compact layout:- When i hover over one contact in Salesforce Lightning:- Another example for custom compact layout on account:- For Account, Opportunity and case detail is also coming along with compact layout fields. These related list can't ...


1

As per documentation localizationService supports only ISO 8601. The date parameter can be a String, Number, or most typically a JavaScript Date. If you provide a String value, use ISO 8601 format to avoid parsing warnings. 31/12/2019 is not as per ISO 8601 format. You either need to convert that to the supported format or a valid Date object in JS....


0

You can't access the DOM until after it has been rendered initially. I actually implemented path using only expressions, no direct class manipulation required. That said, for DOM manipulation, use afterRender instead. There's actually several examples of path components already built you can look at, such as strike_path. Also note that render passes in all ...


Top 50 recent answers are included