• Devon Morancie
  • NEWBIE
  • -1 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
Hi all, I'm having trouble getting a user assigned to a specific ID. 
Basically, when creating a new Task, if the Owner of the Event (custom object) is a certain Id (let's call it A) then the owner of the task must be set to Id C. If the owner is Id B, then it must also be set to Id C. The Id A condition works just fine, but the condition for B does not. I am pasing the Id as a string, to a lookup field (User, Calendar), in an if statement.
if(event.Owner == 'A'){
task.Owner = 'C';}
else if (event.Owner == 'B'){
task.Owner = 'C';}

Condition A works fine, but condition B does not. In the DML insert error, it sas that the task.Owner is null, but ONLY when attempting to set with condition B. The two blocks of code are the same, and I have put  debug statements in there to check and make sure the if statements are firing correctly, and they are. Any ideas?
Hi all, I have been having this issue for two days now and I cannot find any fix for it. Everything was running fine a few days ago, I did not run any updates or anything, and then the CLI started giving me this error in VS Code and in command prompt. I have tried uninstalling the CLI and manually deleting all of the leftover folders several times, uninstalling VSC and all extensions, and reinstaling all with no luck. Any ideas?User-added image
Hello everyone, I started up VS Code this monring and got this error. Tried uninstalling all extensions and Code for a clean restart, still getting it. No SFDX commands will work or anything. Can't find anything in the logs.User-added image
Hi all, so I am getting the error "No base file for markup" while trying to do the LWC trailhead. I have seen that all LWC need to have the same name as the folder containing them, and named accordingly, but I am still getting the same error. I tried typing out the components and also copying/pasting the code from the trailhead, and still getting the same error. Here's the component code..
<template>
<div>
<div>Name: {name}</div>
<div>Description: {description}</div>
<lightning-badge label={material}></lightning-badge>
<lightning-badge label={category}></lightning-badge>
<div>Price: {price}</div>
<div><img src={pictureUrl}/></div>
</div>
</template>
 
The JS code...
import { LightningElement } from 'lwc';
export default class BikeCard extends LightningElement {
name = 'Electra X4';
description = 'A sweet bike built for comfort.';
category = 'Mountain';
material = 'Steel';
price = '$2,700';
pictureUrl = 'https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/electrax4.jpg';
}
 
And the config code...
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
User-added image
Hello, I am getting the following error in VS Code when trying to create a new project. I started doing Lightning Web Components, and since installing the Salesforce CLI and updating all of the downloads to the latest version, it has broken and I get this error whenever creating a new project, either for LWC or regular Lightning. I cannot find any documentation or support for this.

13:47:59.641 sfdx force:project:create --projectname HellowWorldLightningComponent --outputdir c:\Users\Devon Morancie\Documents\Projects --template standard
Error: Unrecognized flag: {"name":"projectname","char":"n","required":true,"description":"name of the generated project","longDescription":"The name for the new project. Any valid folder name is accepted.","type":"string","values":[]}
at flags.forEach.flag (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:77:31)
at Array.forEach (<anonymous>)
at Function.toFlagsConfig (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:28:19)
at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/oclif/force/project/create.js:31:66)
at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:101:21)
at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:115:21)
at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:48:72)
13:48:02.587 sfdx force:project:create --projectname HellowWorldLightningComponent --outputdir c:\Users\Devon Morancie\Documents\Projects --template standard ended with exit code 1
Hi all, I'm having trouble getting a user assigned to a specific ID. 
Basically, when creating a new Task, if the Owner of the Event (custom object) is a certain Id (let's call it A) then the owner of the task must be set to Id C. If the owner is Id B, then it must also be set to Id C. The Id A condition works just fine, but the condition for B does not. I am pasing the Id as a string, to a lookup field (User, Calendar), in an if statement.
if(event.Owner == 'A'){
task.Owner = 'C';}
else if (event.Owner == 'B'){
task.Owner = 'C';}

Condition A works fine, but condition B does not. In the DML insert error, it sas that the task.Owner is null, but ONLY when attempting to set with condition B. The two blocks of code are the same, and I have put  debug statements in there to check and make sure the if statements are firing correctly, and they are. Any ideas?
Hi all, I have been having this issue for two days now and I cannot find any fix for it. Everything was running fine a few days ago, I did not run any updates or anything, and then the CLI started giving me this error in VS Code and in command prompt. I have tried uninstalling the CLI and manually deleting all of the leftover folders several times, uninstalling VSC and all extensions, and reinstaling all with no luck. Any ideas?User-added image
Hi all, so I am getting the error "No base file for markup" while trying to do the LWC trailhead. I have seen that all LWC need to have the same name as the folder containing them, and named accordingly, but I am still getting the same error. I tried typing out the components and also copying/pasting the code from the trailhead, and still getting the same error. Here's the component code..
<template>
<div>
<div>Name: {name}</div>
<div>Description: {description}</div>
<lightning-badge label={material}></lightning-badge>
<lightning-badge label={category}></lightning-badge>
<div>Price: {price}</div>
<div><img src={pictureUrl}/></div>
</div>
</template>
 
The JS code...
import { LightningElement } from 'lwc';
export default class BikeCard extends LightningElement {
name = 'Electra X4';
description = 'A sweet bike built for comfort.';
category = 'Mountain';
material = 'Steel';
price = '$2,700';
pictureUrl = 'https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/electrax4.jpg';
}
 
And the config code...
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
User-added image
Hello, I am getting the following error in VS Code when trying to create a new project. I started doing Lightning Web Components, and since installing the Salesforce CLI and updating all of the downloads to the latest version, it has broken and I get this error whenever creating a new project, either for LWC or regular Lightning. I cannot find any documentation or support for this.

13:47:59.641 sfdx force:project:create --projectname HellowWorldLightningComponent --outputdir c:\Users\Devon Morancie\Documents\Projects --template standard
Error: Unrecognized flag: {"name":"projectname","char":"n","required":true,"description":"name of the generated project","longDescription":"The name for the new project. Any valid folder name is accepted.","type":"string","values":[]}
at flags.forEach.flag (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:77:31)
at Array.forEach (<anonymous>)
at Function.toFlagsConfig (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:28:19)
at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/oclif/force/project/create.js:31:66)
at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:101:21)
at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:115:21)
at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:48:72)
13:48:02.587 sfdx force:project:create --projectname HellowWorldLightningComponent --outputdir c:\Users\Devon Morancie\Documents\Projects --template standard ended with exit code 1