Unexpected file found in package directory: F:\Mine\SalesForce\Salesforce CLI\HelloWorldLightningWebComponent\force-app\main\default\engine.d.ts

This error Unexpected file found in package directory: F:\Mine\SalesForce\Salesforce CLI\HelloWorldLightningWebComponent\force-app\main\default\engine.d.ts. shown up when I’m trying to run command SFDX: Push Source to Default Scratch Org in lightning web component Answer Assuming you didn’t make/copy those files, most likely there was a bug with one of the extensions when you installed/upgraded it. You might try checking … Read more

Using an angular build inside Salesforce [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Salesforce Stack Exchange. Closed 3 years ago. Improve this question Can I take an Angular build and using inside Salesforce within a lightning component? Answer Yes you can using lightning:container. From the … Read more

Adding meta tab for CSP issues in lighting web component

I am using some MDN to load styles and fonts from google but in it is throwing error in the console. lwc_engine.js:6242 Refused to load the stylesheet ‘https://www.google.com/recaptcha/api.js‘ because it violates the following Content Security Policy directive: “style-src ‘self’ chrome-extension: ‘unsafe-inline’ *.visualforce.com https://computing-computing-8460-dev-ed–c.documentforce.com“. Note that ‘style-src-elem’ was not explicitly set, so ‘style-src’ is used as … Read more

Pass an ID for Navigation in a Lightning Web Component

I am working on my first, and pretty simple, Lightning Web Component. The component lives on the contact record page and displaying information from a custom object with a parent lookup relationship. That part is working fine. But, I would also like to be able to include navigation to allow the user to click a … Read more

Multiple Web Components for one Project, Visual Studio

When attempting to create multiple Web Components through VSCode, do you have to create multiple projects, or can you have one project with multiple components? Answer You can have one project for all your components, if you desire, or you can break them up in to multiple projects (e.g. for organization purposes). It would probably … Read more

Getting custom object data related to another custom object

I have been following this article to try and retrieve data for a custom object’s related data. Basically, I have a Student__c object, and I have a StudentCourseRelationship__c object. the StudentCourseRelationship__c object has a master-detail lookup to Student__c. What I am attempting to do is write a component that, when on a Student Page, will … Read more

How to create a Navigation Tab Item that isn’t based on an Object record list

How do you go about creating something that you can make a navigation menu item that isn’t based on Object lists? I need to create something that would generate some custom reports (default Reports aren’t robust enough to handle what I need to do). Basically, I need to allow a user to input some variables … Read more

Web Component can’t find variable `require`

I am trying to use the json2csv javascript package in my Salesforce Web Component, but I get the error: can’t find variable ‘require’. I’ve uploaded the json2csv package as a static resource and am loading it via: import JSON2CSV from ‘@salesforce/resourceUrl/JSON2CSV’; export default class MyComponent extends LightningElement { /** * Variables */ json2csvInitialized = false; … Read more