Hi Rushikesh Jadhav,
It is a spelling mistake in line number 6 for the response. Use response in place of response, Hope this will resolve your issue.
Thanks
#Aura Lightning Components0 discutindo
- Atividade recente
- Data de criação
- Recomendado
- Todas as perguntas
- Perguntas com uma resposta aceita
- Perguntas não respondidas
- Perguntas sem resposta aceita
I have created a functionality of dynamically adding new tabs to the tabset when clicking a button.
But I also want a close button with each tab being added dynamically in this way.
How this can be achieved?
24 de fev. de 2022, 19:36 Hi @Gaurav Kabra If you want to remove the tab from dom, you must attach a state (property in js file) to the tab and use if:true template literal. If just hiding the tab works, use css and hide the tab.
Hello #Trailblazers
I've made some LWC/Aura components that is published on Playground.
Below is list of LWC/Aura that is Published on Playground on Previous Month:-
1. News Lightning Component :- This component is used to display any publicly available news channel website. To use this we need only 2 things Channel Name and URL/Website-link Address. In this we also provide test-class for both Positive/Negative behavior.
2. Lightning Component Inside Lightning Web Component:- In our business, If we want to invoke a lightning web component on a visualforce page that has a parameter according to lightning component that is also combined in the same VF or its vice versa then this article will guide you to pass variables in bi-directional ways from LWC to LC or LC to LWC.
Also Published a Article on Force Talks :- salesforce-lightning-component-inside-lightning-web-component-using-visualforce-page
3. Data Masking - Lightning Web Component:- This LWC is very useful when we want to hide some protected data to display directly. Currently, we can get display data by hovering each cell on the table.
Features:-
- Data Protected using * Symbol (8 Characters)
- Showing Phone, Text type Fields.
- Cell Hovering is used to display Data.
4. Drag & Drop Address of Account on Map - Lightning Web Component:- This LWC is used to drag and drop account name and then directly locate the account location using the address field on Google Map. We can add it to Home Page, Record Page.
Also Published a Article on Force Talks :-
5. Object Viewer - Lightning Web Component:- This LWC is used to see all the Standard as well as Custom Object with all of their Record Types & Child Relationships.
As we know we can use Schema Builder, But this LWC is useful to show all the Objects through a single screen without navigating to another screen.
Below are the articles that is published on force talk about #DocuSign For Salesforce & Mass Insert/Delete #Custom Metadata
- Docusign E-Signature in Salesforce | The Integration Guide
- Mass/Bulk Insert Custom MetaData Records through CSV | Salesforce Developer Guide
3. Marketing Cloud Custom Profile/Subscription Center :- (Gists Link - https://gist.github.com/PrafullJain/5161cb1befbb8954c24dd7493d19c6e1)
My Portfolio:- Prafull Jain Github Portfolio
#Salesforce Developer #Trailhead Community #LWC Development #Addons #Aura Lightning Components #Marketing Cloud
Hello,
I am trying to create a custom lightning web component accessed via visualforce page, but there seems to be an error. Upon analyzing the code and testing, I found out that the recordId is null.
I believe the issue is that recordId is not transferred. Could you help?
ABC.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:attribute name="recordId" type="Id" />
<c:XYZ CardTitle="Create" recordId="{!v.recordId}" />
</aura:component>
- works fine (tested using object -> add button, action etc)
- XYZ component has no issues and is in javascript. It also opens /apex/Lightning_page?oid=recordId
Lightning App - ABCDE.app
<aura:application implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="GLOBAL" extends="ltng:outApp">
<aura:attribute name="recordId" type="Id" />
<c:ABC recordId="{!v.recordId}"/>
</aura:application>
Lightning Web Component - AAA.vfp
<apex:page standardController="Opportunity">
<apex:includeLightning />
<apex:pageBlock >
<apex:pageBlockSection >
<div id="newQ" />
</apex:pageBlockSection>
</apex:pageBlock>
<script>
$Lightning.use("c:ABC", function(){
$Lightning.createComponent(
"c:ABCDE", {
recordId : '{!$CurrentPage.parameters.id}',
console.log('regular access record ID: '+recordId);
}, "newQ", function(cmp){
console.log('regular access record: ');
}
);
});
</script>
</apex:page>
Apex Page call
PageReference refe = new PageReference("/apex/AAA");
Only requirement of the js is recordId.
#Salesforce Developer #Lightning Web Components #Aura Lightning Components #Visualforce Pages #Apex Code
26 de out. de 2021, 21:10 @Gaius Libam Apologies. I decided to proceed in a different manner to execute this flow. Thank you for your help.
Hello,
Can anyone let me know the number of records that can be displayed in lightning:datatable by default without any pagination or infinite loading option.
If possible can you sent me links to refer some examples.
Thanks in advance.
#Aura Lightning Components #Lightning Web Components12 de dez. de 2021, 05:13 Hi,
In Lightning, we can use the Lightning Datatable component with Lazy loading to show infinite records.
https://newstechnologystuff.com/2018/09/19/lightning-data-table-with-lazy-loading/
Could you please help me to understand what is the use of Helper Javascript file in lightning aura bundle with some use cases
#Aura Component #Aura Lightning Components #Lightning Aura #Salesforce Developer #Salesforce Developers #Developer Beginner #Developers #Developer Tools #Salesforce Certified Platform Developer?
6 de nov. de 2021, 06:20 Basically, The controller is the JS file that gets requests from the Component now the first thing we do is write most of the logic in the helper file and the Controller just calls the method defined in the helper the reason is it makes code look cleaner but the main reason is now since you have a method in helper file if you want to call it again then you can call it multiple times from controller method so any function that should act as a reusable function you should define it in helper. any function that we define in controller can only accept 3 parameters in the same order component, event, helper. so it can't contain a normal function that expects dynamic values as Parameter that you can only do in helper file
Hello !
I'm actually trying to add a multiselect into the opportunity creation form to link multiple account to my opportunity.
I have tried to add a lightning component to made that but i can't add successfuly the component into the "fields" of the opportunity form.
Is there a way to achieve that without a custom component ?
If not, did you guys have an example of how to add a custom component into form fields of an object ? (to use it in validation rules for example)
#Lightning Web Components #Aura Lightning Components
Thanks for reading this and for any help that you can provide to me :)
9 de nov. de 2021, 10:21 Thanks for your answer. So it's mean it can't be possible to use the default opportunity form and we should recreate a VF one ?
Hello,
I am able to redirect from a lightning component to another lightning component using:
<c:SecondLighningComp recordId="{!v.recordId}" />
But I cannot redirect to second lightning component on click of a button.
<lightning:button label="Click me" variant="brand" onclick="{!c.handleYes}"></lightning:button>function:
handleYes: function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToComponent");
urlEvent.params({
componentDef: "c:SecondLighningComp",
componentAttributes: {}
});
urlEvent.fire();
}
The second component calls an apex class that uses ApexPages.currentPage().getParameters().get.(Multiple record values) which is returning null. I cannot change anything in the apex class.
How to approach this?
29 de out. de 2021, 02:00 Hi shylesh,
Starting in API version 43.0, the force:navigateToComponent event is deprecated. For more information, see Components with Minimum API Version Requirements. We recommend implementing the lightning:isUrlAddressable interface on your target component and navigating to the component using lightning:navigation component with the standard__component page type instead. This generates a route in the format /cmp/{componentName}?myAttr=attrValue.
Migrate to lightning:isUrlAddressable from force:navigateToComponent
Hello,
I tried creating a server-side action and came across a weird issue. I tried checking online for solutions and am still stuck. Could you help me?
Lightning Component: TunaFishCheck.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" controller="SeaFood" access="global">
<aura:attribute name="tuna" type="Boolean" default="false"/>
<aura:handler name="init" value="{!this}" action="{!c.tunaCheck}"/>
<aura:if isTrue="{!tuna}">
<div>true</div>
<aura:set attribute="else">
<div>false</div>
</aura:set>
</aura:if>
</aura:component>
function
tunaCheck: function (cmp){
console.log('Its inside');
var tuna= cmp.get("c.doAction");
console.log('Check: ' + tuna);
action.setCallback(this, function(response){
var stateF = response.getReturnValue();
alert("Check: " + stateF);
if (stateF === 'SUCCESS'){
component.set("{!v.tuna}", response.getReturnValue());
} else {
console.log('Unsuccessful return value');
}
});
$A.enqueueAction(tuna);
}
Apex Component
public with sharing class SeaFood {
ApexPages.StandardController sc;
public SeaFood(ApexPages.StandardController controll){
this.sc = controll;
}
@AuraEnabled
public static Boolean doAction(){
PageReference refPage;
Boolean fish = fishCheck()();
if (fish){
return true;
} else if (!fish){
return false;
}
return fish;
}
@AuraEnabled
Public static Boolean fishCheck(){
//censored functionality code
return true;
}
Note: while running,
console log shows:
Its Inside
Check:
SecureAction: [object Object]{ key: {"namespace":"c"}
UI:
error while creating componenet for lightning component quick action [Action failed c:TunaFishCheck$controller$tunaCheck [action is not defined]]
Noticed that console.log('Check: ' + tuna); doesn't have a value
How can I fix these issues?
#Salesforce Developer #Custom Actions #Apex Class #Aura Lightning Components #Lightning Component #Lightning Flow
29 de out. de 2021, 03:14 @Suraj Tripathi I able to add the value but there seems to be a bug. The code does not do initialization and goes directly to <aura:set attribute="else"> statement. If I remove the else statement, then only it goes into <aura:if>. Any suggestions?
Note: I have the initialization command in the code
<aura:attribute name="tuna" type="Boolean" default=""/>
<aura:handler name="init" value="{!this}" action="{!c.tunaCheck}"/>
I want to fetch the 3-4 fields of order object in an HTML table in editable mode on a aura component action button click. I do not want to use datatable. I want entire row to be editable and update the record on change.
Please help me how could I do this using html table.
#HTML Table #Aura Lightning Components #Action Button #Inline Editing
28 de out. de 2021, 06:58 Thankyou @Azfer Pervaiz Sir for replying, but I have a requirement to use only html table instead of datatable