• Carl johnson 18
  • -3 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3

I have a list of instances of an Apex Class (see the picture)apex class

I am able to show that list in a component (LWC) by using imperative apex calls, but if I pass that list to a child component (LWC) in the child component the javascript shows undefined. It means I can not share a list of instances of an apex class from parent to child.

pcEntryAndOppLine is my variable with the list of instances,

If I do in the parent component javascript this:

this.temp = JSON.parse(JSON.stringify(this.pcEntryAndOppLine));

and I share temp instead of pcEntryAndOppLine, then the child LWC will receive the list and will be able to print it in a for loop (I dont know why, I you can help me to understand this also I will appreciate it!)

But if I use that list in the child component inside a for loop that contains another small component (for showing each element of the list) the javascript shows an undefined error, for example when getting the property ".Name".

How Can I have that variable working as another one (I am sharing the record Id and other variables and it works as expected.)

If you need more info please ask for it, thanks in advance.

I'm wondering if this is just a glitch in Salesforce and if anyone has any workaround. I currently have a Trigger on ContentDocumentLink that sends an email to the owner of a custom object record when a File or Note is created and attached to that record. The trigger also attaches file information and the body of the Note if it's a ContentNote being inserted. The trigger handles the logic in differentiating Notes from other file types. The problem is when the user hits the button to create a new Note in classic or in the Console, an empty, untitled, new note record is inserted instantly firing my trigger before the user has time to add content to the body. In Lightning it at least allows the user to fill out the header of the note before saving, but saves before the note body is filled out. Cancelling out of creating the note still leaves the blank note saved and attached to the record. Any help in understanding why the note saves before the user hits the save button would be appreciated.
I keep getting an error on Item #4 "The custom set of fields that are highlighted on account records must be assigned to the required profile."

The requirement is asking for having highlights based on profiles, but as we know compact layouts are applied to the whole system not by profile.

I am not sure how to fix this, any help is appreciated.