Skip to main content

#LightningWebComponent0 discutindo

Integrating Cloud Files with LWC via Visualforce and Aura

In a recent project, I encountered a challenge while trying to integrate Cloud Files, a feature that was part of a managed package, into a Lightning Web Component (LWC). As many developers are aware, it’s not possible to directly invoke an Aura component from LWC. However, given the requirements of the project, I needed to find a workaround to make this integration work seamlessly.

The Solution:

I devised a solution by leveraging Visualforce pages to act as a bridge between LWC and Aura components. Here’s how I approached the problem:

1. Calling Visualforce from LWC:

I embedded a Visualforce page within my LWC using the <iframe> approach. This allowed me to invoke the Visualforce page directly from within the LWC framework.

2. Invoking Aura from Visualforce:

From the Visualforce page, I utilized JavaScript to call an Aura application. This app served as a middle layer between Visualforce and the Aura components.

3. Connecting to the Aura Component:

Finally, from the Aura application, I invoked the necessary Aura components that were required to interact with the Cloud Files managed package.

This layered approach allowed me to successfully integrate Cloud Files functionality within my LWC while respecting the architectural boundaries between LWC and Aura. Although not a direct method, this solution provided a seamless user experience and ensured that I could leverage managed package components in a modern LWC environment.

How else would you approach this issue?

Share your ideas and aske me your questions if there is one!

#Aura #Salesforce Developer #LightningWebComponent
0/9000

"You can't add more than 250 components to a page. Dynamic Forms field components don't count toward this limit."

 

 I'm using the Field section as shown in the screenshot to breakdown Record detail as per User basis. Should I use LWC component here? #Trailhead Challenges #Salesforce Developer #LightningWebComponent

 

I'm having trouble finding any documentation around this.

 

Is there a way to see how many components are currently on a page?

Does anyone have advice on working within this limitation?

 

250 components on Lightning record page:

2 respostas
  1. 7 de jun. de 2024, 12:04

    You can’t add more than 250 components to a page. Dynamic Forms field components don’t count toward this limit. i am also facing same issue, what will be the approach

0/9000

default column numbers in lighting-datatable if the columns are editable.

 

<template>

    <div class="xxx">

        <template if:false={aaa}>

            <lightning-datatable

                    key-field={setKey}

                    data={tableData}

                    columns={columns}

                    onsave={handleTableSave}

                    draft-values={draftValues}

                    hide-checkbox-column

            >

            </lightning-datatable>

            <template if:true={isLoading}>

                <div class="loading-container">

                    <lightning-spinner alternative-text="Loading..." size="medium"></lightning-spinner>

                </div>

            </template>

        </template>

        <template if:true={aaa}>

            <lightning-datatable

                    key-field={setKey}

                    data={aggregates}

                    columns={bbbbColumns}

                    hide-checkbox-column

                    >

            </lightning-datatable>

        </template>

    </div>

</template>

 

I was using show-row-number-column = false but did not work.

I did try not using show-row-number-column according this stack post

How do I hide the default row number from the first column in a lightning-datatable (LWC)?

still nothing working.

I tried following the CSS, but this one only hides the row numbers of non-editable columns.In the table with editable columns, the row numbers are not hidden. Any suggestion is helpful.

 

.THIS tr td:first-child{

    display:none;

}

.THIS tr th:first-child{

    display:none;

2 respostas
  1. 2 de fev. de 2024, 00:14

    @Aruna Rapolu

     ensure you're correctly applying the show-row-number-column attribute to your lightning-datatable tag 

    <lightning-datatable

    key-field="id"

    data={data}

    columns={columns}

    show-row-number-column="false"

    draft-values={draftValues}

    onsave={handleSave}

    hide-checkbox-column>

    </lightning-datatable>

    just added the line i.e show-row-number-column="false"

    <template>

    <div class="xxx">

    <template if:false={aaa}>

    <lightning-datatable

    key-field={setKey}

    data={tableData}

    columns={columns}

    onsave={handleTableSave}

    draft-values={draftValues}

    hide-checkbox-column

    show-row-number-column="false" <!-- Add this line -->

    >

    </lightning-datatable>

    <template if:true={isLoading}>

    <div class="loading-container">

    <lightning-spinner alternative-text="Loading..." size="medium"></lightning-spinner>

    </div>

    </template>

    </template>

    <template if:true={aaa}>

    <lightning-datatable

    key-field={setKey}

    data={aggregates}

    columns={bbbbColumns}

    hide-checkbox-column

    show-row-number-column="false" <!-- Add this line -->

    >

    </lightning-datatable>

    </template>

    </div>

    </template>

0/9000
3 respostas
  1. 29 de dez. de 2023, 10:57

    Hello @Alok Singh,

    You must create one button on the LWC component on click

    handleback(event) {

            setTimeout(

                function () {

                    window.history.back();

                }, 1000

            );

        }

    in js , try this it get back you to the same list view record page.

0/9000

#SalesforceOhana #TrailblazerCommunity I'm super excited to launch my first course on Udemy titled Mastering Lightning Datatable in Salesforce LWC. Lightning Datatable is a super useful component which is reused almost in every custom salesforce implementation and in this course, you'll learn about almost every aspect of lightning datatable from scratch and you'll level up as a salesforce developer. We're going to write a lot of LWC code as all the videos are hands-on with little to no theory!

 

I am giving away 100 free coupons to our trailblazer community. Fill in the below in the blog post below and stand a chance to win the course for free!

 

https://www.sfdcstop.com/2023/10/introducing-mastering-lightning.html

 

However, if you're interested to purchase this course to get immediate access, you can buy it at the current best price using the below link:

 

https://www.udemy.com/course/mastering-lightning-datatable-in-salesforce-lwc/?couponCode=2C57B820FBB20BFF919B

 

Happy Learning!

 

#SFDCStop #LWC #LightningWebComponent #Salesforce #Salesforce Developer #Salesforcecommunity #Salesforce Platform

1 comentário
0/9000

I know i did this before but i can't remember how i did it. I used a lwc as a wrapper to a visulaforce page. It wasn't complicated but i can't seem to find any information on how to do this anywhere #Apex #LightningWebComponent #LWC

1 resposta
0/9000

🚀 Salesforce Winter '24 Release Update

 

⚡The Winter '24 release of Salesforce includes a number of enhancements for Lightning Web Components (LWC). In my latest blog post, I take a look at some of the most important new features: 🌩️

 

  1. New and Changed Directives
  2. Create and Manage Toast Notifications
  3. Control Workspace Tabs and Subtabs
  4. Monitor Component Events
  5. Latest LWC Features with Component-Level API Versioning

I also provide some code samples and tips for getting started with these new features.

🔗 Check out the full blog post here. https://debugforce.blogspot.com/2023/09/lwc-enhancements-for-developers.html 

 

I hope you find this post helpful!

 

🌩️Do you have any questions about the LWC enhancements in the Winter '24 release? Let me know in the comments below. ❓🚀 Salesforce Winter '24 Release Update ✨ ⚡The Winter '24 release of Salesforce includes a number of enhancements for Lightning Web Components (LWC).

#Salesforce #Salesforce Developer    #Winter24 #New Releases #Release Notes #Release Updates Announcements  #LWC #LightningWebComponent #LWC Development #Learning  

1 comentário
0/9000

in ios device on salesforce 1 app for opportunity object we have custom related list link which(<a href="$/lightning/r/Opportunity/recordId/related/Opportunity_Roles__r/view" tabindex="-1" target="_blank">View Sales Team Details</a>)

 is not redirecting to the related list page but instead it is redairecting to the opportunity detail page How to make it redirect to the related list page?

but it is working fine for android and dekstop

#Salesforce For iOS/Android #Salesforce #LightningWebComponent

0/9000

#SalesforceOhana #TrailblazerCommunity It took me almost a week to complete this blog post and it's been a while I've posted something new as well. I hope you'll like it!

 

#Newpost #SFDCStop Lifecycle Hooks in LWC

 

https://www.sfdcstop.com/2023/08/lifecycle-hooks-in-lwc.html

 

#LWC #LightningWebComponent #Salesforce #Salesforce Developer #Salesforce Developers

7 comentários
  1. 27 de ago. de 2023, 05:14

    @Buyan thyagarajand Thank you! I think use cases mainly emerge when we face different business requirements, I'll share particular use cases if I come across any such business requirements in future.

0/9000
0/9000