• Roman Regmi
  • NEWBIE
  • 45 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 6
    Replies
I am getting the above error when I try to send data to salesforce org using node and express. How do I resolve this?

Here is my code
User-added image
Whenever I try to create a lightning app, I get the following error. 
User-added image

I try to insert an image for my app. But am unable to do so. 
I am opening the app as an admin.User-added image 
I have no idea why I can't select the fields. I can read/write on them. 
I have a scenario where I need to check if a file has been added to a custom object record. If a file is already present, then the user should not be able to upload more files. Else, the user should be able to upload files.
User-added image

The data is stored in this.imageUrl and this.itemList. I want the itemList to have an additional key value pair with key as 'url' and value as the data in imageUrl

The data in itemsList = [
{Item_Name__c: 'Chicken Momo', Price__c: 2.5, Id: 'a0C5j000000JiOIEA0'},
{Item_Name__c: 'Veg Momo', Price__c: 1.5, Id: 'a0C5j000000JiOHEA0'}
]

The data in imageUrl = ['/sfc/servlet.shepherd/document/download/0695j000007jP4qAAE', '/sfc/servlet.shepherd/document/download/0695j000007igi6AAA']

I want something like
temsList = [
{Item_Name__c: 'Chicken Momo', Price__c: 2.5, Id: 'a0C5j000000JiOIEA0',
url:'/sfc/servlet.shepherd/document/download/0695j000007jP4qAAE'},
{Item_Name__c: 'Veg Momo', Price__c: 1.5, Id: 'a0C5j000000JiOHEA0',
url:'/sfc/servlet.shepherd/document/download/0695j000007igi6AAA'}
]
 
User-added image

I was able to create new LWC component, deploy source to org before. But after I closed the project and reopend it, I can no longer do any of those. How do I resolve this?
I am trying to load images that I have uploaded as a zip file on my org Static Resources. However, the images do not load. Why is this happening?User-added image
My Code
import { LightningElement } from 'lwc';
import CAROUSEL_IMAGES from '@salesforce/resourceUrl/carousel';
export default class CustomCarouselWrapper extends LightningElement {
slides = [
{
image : `${CAROUSEL_IMAGES}/carousel/Naruto.jpeg`
},
{
image : `${CAROUSEL_IMAGES}/carousel/Luffy.jpeg`
},
{
image : `${CAROUSEL_IMAGES}/carousel/DragonBallZ.jpg`
}
]

}
When I press the Add To Cart button, if I am logged in as system admin, the button works.WorkingBut when I am logged in as a User, the same button does not work.
Not WorkingWhy is this error occuring, and how to I resolve it?

I am trying to update the value of my object elements whenever one of the object is deleted. However, I always get the Uncaught ReferenceError: i is not defined error on my console. 

Here is my code 

deleteTask(event) {

this.todoTasks = this.todoTasks.filter(task => task.id !== event.target.name);
this.updateId();
console.log(this.todoTasks);
}
updateId(){
for(i=1; i<=this.todoTasks.length; i++){
this.todoTasks[i-1].id = i;
}
}

I have a scenario where I need to check if a file has been added to a custom object record. If a file is already present, then the user should not be able to upload more files. Else, the user should be able to upload files.
User-added image

I was able to create new LWC component, deploy source to org before. But after I closed the project and reopend it, I can no longer do any of those. How do I resolve this?
I am trying to load images that I have uploaded as a zip file on my org Static Resources. However, the images do not load. Why is this happening?User-added image
My Code
import { LightningElement } from 'lwc';
import CAROUSEL_IMAGES from '@salesforce/resourceUrl/carousel';
export default class CustomCarouselWrapper extends LightningElement {
slides = [
{
image : `${CAROUSEL_IMAGES}/carousel/Naruto.jpeg`
},
{
image : `${CAROUSEL_IMAGES}/carousel/Luffy.jpeg`
},
{
image : `${CAROUSEL_IMAGES}/carousel/DragonBallZ.jpg`
}
]

}
I see only delete - no edit. Is this not possible or hidden somehow?