• Abilash P 1
  • NEWBIE
  • 10 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
Hello,

I was trying to do trailhead module troubleshooot lwc component. From VS code I tried to deploy force-app/main/default. I have cli version 7.187.1-09910f2. Finally when tried to deploy says 
ERROR running force:source:deploy:  No source-backed components present in the package.
Please let me know.
Thanks in advance.
 
Hi Everone,
I am facing issue In Account obj, that Assignee field has salesperson name. He has email. That email is not populating in email from Feed. 
I have given permissions required. The email id is displaying the sandbox owner name email id. The account which has associated sales person email has to reflect in email.
Please let me know.
The assinee name email has to populate there by deafult.
Hi,
I had a Interview question.
I need to display List of accounts in lwc datatable. In account object I need to query case status field from case object, where Account and Case are independent. Dont have any relationship. How to SOQL this.

Hint: Can use wrapper class.

I am not understand. Please help me.
Thanks.
we have 2 different profiles like sales manager & service and each profile having read & write acceess on account object will they access each others record?
If access , how to restrict
Hi everyone.
I need to display Row1 column1 name when user edited that same row column 4 on lightning card.
Here is my code.
I have used custom datatable lwc with inline edit. 
When user edited R1 C4 then that particular same Row(R1) C1 should display. 
Please help me out the logic.

-------------------------------------------------------------
<template if:true = {showTable1}>
        <lightning-card  icon-name="standard:user" style="color:#ff8000;">{currentUserName}</lightning-card>
        <c-l-w-c-custom-datatable-type
                    key-field="Id"
                    data={data}
                    columns={columns}
                    draft-values={draftValues}
                    hide-checkbox-column>
                </c-l-w-c-custom-datatable-type>
    </template>
------------------------------------------------------
handleSave(event) {
        this.showSpinner = true;
        this.showTable1 = true;
        this.draftValues = event.detail.draftValues;
        this.saveDraftValues = this.draftValues;
 
        const recordInputs = this.saveDraftValues.slice().map(draft => {
            const fields = Object.assign({}, draft);
            return { fields };
        });
 
        // Updateing the records using the UiRecordAPi
        const promises = recordInputs.map(recordInput => updateRecord(recordInput));
        Promise.all(promises).then(res => {
            this.showToast('Success', 'Records Updated Successfully!', 'success', 'dismissable');
            this.draftValues = [];
            return this.refresh();
        }).catch(error => {
            console.log(error);
            this.showToast('Error', 'An Error Occured!!', 'error', 'dismissable');
        }).finally(() => {
            this.draftValues = [];
            this.showSpinner = false;
        });
    }
 ----------------------------------------------------------------
When user edited Region field, then that particular column Name(column 1) should display.
Hi Everyone,

I have created apex class to pull multiple object records into single list. Where objects does not have any relationship (lets say account, contact, lead. Consider account and contact dont have any relationship). I used for loop seperately for each object and saved into wrapperlist. For threee objects I have three wrapper list. Now big challenge is I need to add three wrappers(wrapAccount, wrapContact, wrapLead)  into single list. So in that list I need all three objects records.

-------------------------------------------------------------------------
@Auraenabled(cacheable=true)  
    public static List<sObject> wrapData() {
        List<WrapperContact> wrapContact = new List<WrapperContact>();
        List<WrapperAccount> wrapAccount = new List<WrapperAccount>();
        List<WrapperLead> wrapLead = new List<WrapperLead>();
        
       
        
        for(Contact ct : [select id, name from Contact LIMIT 10]){          
            wrapContact.add(new WrapperContact(ct));            
        }
        for(Account acct : [select id, name from Account LIMIT 10]){          
            wrapAccount.add(new WrapperAccount(acct));            
        }
        for(Lead ld : [select id, name from Lead LIMIT 10]){          
            wrapLead.add(new WrapperLead(ld));            
        }
        system.debug('wrapContact'+wrapContact);
        system.debug('wrapAccount'+wrapAccount);
        system.debug('wrapLead'+wrapLead);
     List<SObject> s = new List<SObject>{
            new Contact(),
            new Account(),
            new Lead()            
        };
   //     s.add(wrapContact);
   //     s.addAll(wrapAccount);
   //         system.debug(s);
        List<sObject> objects = new List<sObject>();
    //    objects.addAll((List<sObject>)(wrapContact));
      //    objects.addAll((List<sObject>)(wrapAccount));
   //     objects.addAll(wrapLead);
          return objects;
     
    }



     public class WrapperAccount{
                
        @Auraenabled
        public Account ac{get;set;}
         
        public WrapperAccount(Account acct){
            ac=acct;
        }
        
    }

     public class WrapperContact{
        @Auraenabled
        public Contact cont{get;set;}
              
        public WrapperContact(Contact ct){
            cont=ct;
        }
                      
    }

     public class WrapperLead{
               
        @Auraenabled
        public Lead ldd{get;set;}
            
        public WrapperLead(Lead ld){
            ldd=ld;
        }
    }    

----------------------------------------------------------------------
I have used List<SObject> s = new List<SObject>{
            new Contact(),
            new Account(),
            new Lead()            
        };
   //     s.add(wrapContact);
   //     s.addAll(wrapAccount);
         s.addAll(wrapLead);
   //         system.debug(s);
But its not working. Please help me out of this.
Thanks in Advance
Hi Everone,
I am facing issue In Account obj, that Assignee field has salesperson name. He has email. That email is not populating in email from Feed. 
I have given permissions required. The email id is displaying the sandbox owner name email id. The account which has associated sales person email has to reflect in email.
Please let me know.
The assinee name email has to populate there by deafult.
we have 2 different profiles like sales manager & service and each profile having read & write acceess on account object will they access each others record?
If access , how to restrict