Skip to main content

#Lighting Web Components0 personne en discute

We couldn't find a Lightning web component named 'helloWorld'.

I am getting the above error but the page has such component on top which is clearly visible. I followed all the steps mentioned in the tutorial but still can't resolve the error.

It would be good if someone can help on this.

 

#Lighting Web Components

3 réponses
  1. 30 mai, 12:58

    This usually happens when Salesforce is unable to recognize the component even if it looks visible in the UI.

    Most common reasons are:

    •  The component name is case-sensitive (helloWorld must match exactly in folder, file, and usage) 
    •  The component is not properly deployed to the org 
    •  The meta.xml file is missing proper exposure targets 
    •  The page still has a cached or old version of the component 

    Try removing the component from the page, deploying again, and then re-adding it in Lightning App Builder. In most cases, this fixes the issue.

0/9000

[▶️]🔴🔥🎬 How To Delete Lightning Web Component From Org

 

With the introduction of Lightning Web Component, developers can now build lots of cool UI (User Interface) components. In order to develop Lightning Web Component (LWC), developers need an editor (preferably  Visual Studio Code) and then deploy the component through package or through changeset. But unlike other metadata available in Salesforce, deleting Lightning Web Component is not that straightforward. You can’t delete a Lightning Web Component from Salesforce Setup. In this blog post, I am going to share couple of ways you can delete the bundle from Salesforce Org.

 

🎬 https://youtu.be/-EjN2TYV6gc

 

📒 https://sudipta-deb.in/2024/09/how-to-delete-lightning-web-component-from-org.html

 

[▶️]🔴🔥🎬 How To Delete Lightning Web Component From Org With the introduction of Lightning Web Component, developers can now build lots of cool UI (User Interface) components.

@The Blog Group

 

#Lighting Web Components

0/9000
3 réponses
  1. Forum Ambassador Ines Garcia (get: Agile)
    1 nov. 2021, 12:18

    Why LWC?

    what is the component to do?

    and are you familiar with the standard functionality you have at hand.

0/9000

Bom dia, alguém sabe me informar quais são os testes de sistemas automatizados usado pelo salesforces?

2 réponses
0/9000
The Learner (Developer chez graybar) a posé une question dans #LWC

Hi Experts,

 

I need to create a record on the selection of record type,  I have created a Combobox and populated the record type, now my requirement is that on the selection of that record type I need to create a record.

 

<template>

<div if:true={objectInfo.data}>

<lightning-combobox name="recordType" label="Record Type" placeholder="Choose Status"

value={value}

options={recordTypeId1}>

</lightning-combobox>

</div>

</template>

jS:

import { LightningElement, track, wire, api } from 'lwc';

import { getObjectInfo } from 'lightning/uiObjectInfoApi';

import CONTACT_OBJECT from '@salesforce/schema/Support_Request__c';

export default class CreateContact extends LightningElement {

@track statusOptions;

@track value;

@api objectApiName;

@track objectInfo;

@wire(getObjectInfo, { objectApiName: CONTACT_OBJECT,})

objectInfo;

get recordTypeId1() {

var recordtypeinfo = this.objectInfo.data.recordTypeInfos;

var uiCombobox = [];

console.log("recordtype" + recordtypeinfo);

for(var eachRecordtype in recordtypeinfo)//this is to match structure of lightning combo box

{

if(recordtypeinfo.hasOwnProperty(eachRecordtype))

uiCombobox.push({ label: recordtypeinfo[eachRecordtype].name, value: recordtypeinfo[eachRecordtype].name })

}

console.log('uiCombobox' + JSON.stringify(uiCombobox));

return uiCombobox;

}

}

Meta:

<?xml version="1.0" encoding="UTF-8"?>

<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

<apiVersion>52.0</apiVersion>

<isExposed>true</isExposed>

<targets>

<target>lightning__AppPage</target>

<target>lightning__RecordPage</target>

<target>lightning__HomePage</target>

</targets>

</LightningComponentBundle>

#LWC  #LWC Development  #LWC Component  #LWC Components  #Lighting Web Components  #Custom LWC  #Sales Cloud

18 réponses
0/9000
The Learner (Developer chez graybar) a posé une question dans #LWC

hi experts,

 

I have to create nested list view( like list of account with their contact under specific account) can anyone help using lwc

 

#LWC  #LWC Component  #LWC Superbadge Challenge  #LWC Components  #Lighting Web Components  #Salesforce Developer  #Lightning Web Components  #Sales Cloud

2 réponses
0/9000
2 réponses
0/9000

Hi, I'm facing an issue in  

Starting SFDX: Authorize a Dev Hub

 

23:05:32.977 sfdx force:auth:web:login --setdefaultdevhubusername

23:05:32.981 sfdx force:auth:web:login --setdefaultdevhubusername

 ended with error spawn C:\WINDOWS\system32\cmd.exe ENOENT   I have tried using this link https://developer.salesforce.com/forums/?id=9060G000000MVBsQAO  cmd works fine

 

#Lighting Web Components  

Error in Authorize a Dev Hub

 

2.PNG

Cannot able to know where i'm stuck

4 réponses
  1. 18 août 2021, 18:23

    Dinesh,  created folder and pasted,tried authenticating,still getting same error   

    Starting SFDX: Authorize a Dev Hub

     

     sfdx force:auth:web:login --setdefaultdevhubusername

     sfdx force:auth:web:login --setdefaultdevhubusername

     ended with error spawn C:\WINDOWS\system32\cmd.exe ENOENT 

0/9000

Hi, I have lighting pages with tabs and fields, and I would like to change the selected tab or put focus on a given field, ideally with some URL parameters that I would set depending on the context.  How to do that? More generally, how to script / automate UI clicks / navigation without bulding a full specific page with web components or visulaforce?

 

#Sales Cloud  #Automation #Lighting Web Components

2 réponses
  1. 27 juil. 2021, 09:23

    no my need is not about visibility, but about changing active Tab & fields 

0/9000

/**

* Created by ARapole on 6/24/2021.

*/

import { LightningElement, wire, api, track } from "lwc";

import getAssetRecords from '@salesforce/apex/AssetController.getAssetRecords';

import { ShowToastEvent } from 'lightning/platformShowToastEvent'

import {updateRecord} from "lightning/uiRecordApi";

export default class AssetTable extends LightningElement {

@api recordId;

@api records;

@track wiredRecords;

@track data = [];

error;

//have this attribute to track data changed

//with custom picklist or custom lookup

@track draftValues = [];

@api columns;

@track tableLoadingState = true;

lastSavedData = [];

connectedCallback() {

this.columns=[

{label: 'Asset Name', fieldName: 'Name', Type: 'text'},

{label: 'Account Name', fieldName: 'Account.Name' , Type: 'text'},

{label: 'Title Description', fieldName: 'Title_Description__c' , Type: 'text'},

{label: 'Asset Term', fieldName: 'Asset_Term__c' , Type: 'text'},

{label: 'Start Date', fieldName: 'Start_Date__c' , Type: 'Date'} ,

{label: 'End Date', fieldName: 'End_Date__c' , Type: 'Date'},

{label: 'Adjusted End Date ', fieldName: 'Adjusted_End_Date__c', Type: 'Date' , editable: true},

{

label: 'Adjusted End Date Reason ', fieldName: 'Adjusted_End_Date_Reason__c', type: 'picklist', editable: true, typeAttributes: {

placeholder: 'Choose adjusted end date reason', options: [

{ label: 'Start Date', value: 'Start Date' },

{ label: 'Extension', value: 'Extension' },

{ label: 'Add-on Alignment', value: 'Add-on Alignment' },

{ label: 'Proration', value: 'Proration' },

{ label: 'Error: Mixed Term', value: 'Error Mixed Term' },

{ label: 'Consecutive Terms', value: 'Consecutive Terms' },

{ label: 'Summer Pilot', value: 'Summer Pilot' },

] // list of all picklist options

, value: { fieldName: 'Adjusted_End_Date_Reason__c' } // default value for picklist

, context: { fieldName: 'Id' } // binding asset Id with context variable to be returned back

}

}

];

}

@wire(getAssetRecords, {subscriptionId: '$recordId'})

wiredAsset( { error, data } ) {

this.isSpinner = false;

if (data) {

this.data = data;

this.error = undefined;

} else if (error) {

this.error = error;

this.data = undefined;

}

this.tableLoadingState = false;

this.lastSavedData = JSON.parse(JSON.stringify(this.data));

}

updateDataValues(updateItem) {

// let copyData = [... this.data];

let copyData = JSON.parse(JSON.stringify([... this.data]));

copyData.forEach(item => {

if (item.Id === updateItem.Id) {

for (let field in updateItem) {

item[field] = updateItem[field];

}

}

});

//write changes back to original data

this.data = [...copyData];

}

updateDraftValues(updateItem) {

let draftValueChanged = false;

// let copyDraftValues = [...this.draftValues];

let copyDraftValues=JSON.parse(JSON.stringify([...this.draftValues]));

//store changed value to do operations

//on save. This will enable inline editing &

//show standard cancel & save button

copyDraftValues.forEach(item => {

if (item.Id === updateItem.Id) {

let temUpdateItem=Object.assign([],updateItem);

for (let field in updateItem) {

item[field] = updateItem[field];

}

draftValueChanged = true;

}

});

if (draftValueChanged) {

this.draftValues = [...copyDraftValues];

} else {

this.draftValues = [...copyDraftValues, updateItem];

}

}

//listener handler to get the context and data

//updates datatable

picklistChanged(event) {

event.stopPropagation();

let dataRecieved = event.detail.data;

let updatedItem = { Id: dataRecieved.context, Adjusted_End_Date_Reason__c: dataRecieved.value };

this.updateDraftValues(updatedItem);

this.updateDataValues(updatedItem);

}

//handler to handle cell changes & update values in draft values

handleCellChange(event) {

this.updateDraftValues(event.detail.draftValues[0]);

// this.updateDraftValues(JSON.parse(JSON.stringify(this.data)));

}

handleSave(event){

this.lastSavedData = event.detail.draftValues;

const recordInputs=this.lastSavedData.slice().map(

draft =>{

const fields=Object.assign({},draft);

return {fields};

});

updateRecord(recordInputs).then(() => {

})

//update the records using the asset id

const promises=recordInputs.map(recordInput => updateRecord(recordInput));

Promise.all(promises).then(res => {

this.dispatchEvent(

new ShowToastEvent({

title: 'Success',

message: 'Asset Adjusted End Date UpdatedSuccessfully',

variant: 'Success'

})

);

this.lastSavedData=[];

//return this.refresh();

return refreshApex(this.error,this.data);

}).catch(error =>{

this.dispatchEvent(

new ShowToastEvent({

title : 'Error',

message: 'Could not update the Adjusted End Date An Error Occurred.',

variant: 'error'

})

);

}).finally(() =>{

this.lastSavedData=[];

});

return refreshApex(this.error,this.data);

}

handleCancel(event) {

//remove draftValues & revert data changes

this.data = JSON.parse(JSON.stringify(this.lastSavedData));

this.draftValues = [];

}

}

<template>

<template if:true={data}>

<c-custom-data-table

key-field="Id"

data={data}

columns={columns}

onpicklistchanged={picklistChanged}

onvalueselect={handleSelection}

draft-values={draftValues}

oncellchange={handleCellChange}

onsave={handleSave}

oncancel={handleCancel}

hide-checkbox-column

is-loading={tableLoadingState}>

</c-custom-data-table>

</template>

</template>

#LWC Component #Salesforce Developer #Lighting Web Components

4 réponses
  1. 12 juil. 2021, 15:06

    Hi, @Aruna Rapole

    Can you kindly share rest of the code related to this component, so I can recreate your issue at my end. As I can see currently, there is a custom component 'custom-data-table' for which the code is missing from the original question.

     

    Regards

    Manish

0/9000