• Sandile mathe
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 1
    Replies
Hi guys, I know that inline editing is not supported on the treegrid is there any custom idea i can use to be able to edit/update parent or child on the treeGrid table?
I have an Apex class that returns a list of Billing Accounts and then make a selection list. when The Aura lightning Components load the value is passed to Child Comp(That is working fine) and when there is more than ONE results its Defaults to first value, I dont want it to default to First Value if there is more than one I want the user to Select First then send value to child.

How can I NOT default to first value when more than one value return from Apex class (returning the LIST )in Lightning Component?
Hi, I have a fieldSet on Contact Object, So On Apex Class I want to check that if One of the Fields (in Fieldset) is updated then Call my methodXXX, How do I do this in Apex Class, please help
Hi Guys, Can you you please help me with proper configs of my visual studio code. Everythings seems okay I have updated NodeJS, SF CLI & Jshint and set up all the Eviromental virables. But on LWC javascript file I get a syntax error when I use @api or @wire,please helpUser-added image
Hi Guys. Has anyone worked on the LWC where you have to filter the Data table based on the User Input. Example: data table showing list of Opportunities list at the top of the table have a field with values(Picklist), lets says STAGE. if the user chooses stage value then the table should show the list with the selected results(Stage = "Closed won"). I spent days trying to archive this but failed to make it work, I have very few experience with LWC.
Here are the steps I followed using a trigger but its not happening. Please help. Maybe I am missing something

1. I created a new field of Checkbox type on Contact Object to Flag contact as Key Contact
Field Name : Key_Contact__c
type : Checkbox
Object : Contact


2. The Trigger Class to Link Contacts That Flagged as key Contact when creating an Opportunity.


------------------------------------START------------------------------------------------
trigger LinkContacts on Opportunity (before insert, before update) {
   
set<Id> AccountIds = new set<Id>();
for (Opportunity  o: trigger.new) {
 AccountIds.add(o.AccountId);
}
map<Id, Account> AccountContactMap = new map<Id, Account>();
map<Id, Contact> ContactMap = new map<Id, Contact>();
list<Account> AccConts = new list<Account>();
AccConts = [Select Id, Name, (Select Id, Name, Key_Contact__c from Contacts Where Key_Contact__c = true) from Account where Id IN : AccountIds];
for(Account acc : AccConts){
    AccountContactMap.put(acc.Id, acc);
}

for (Opportunity  o: trigger.new) {
Account Acc = AccountContactMap.get(o.AccountId);
if(Acc != null){
List<Contact> conts = new list<Contact>(Acc.Contacts);
                 map<Id, Contact> ContactMap = new map<Id, Contact>();
                  Contact Con = ContactMap.get(o.ContactId);
if(conts.size() > 0 ){
                   
                    if(Con.Key_Contact__c = true){
                       
                        for(Contact contactFlag : conts){
    ContactMap.put(contactFlag.Id,con );
}
                    }

}
}


}
}

--------------------------------------END-------------------------------------------------

 
functionality where end user can choose multiple field values from multi select picklist and based on that master picklist user should be able to select a multiple child values from the another multi select picklist.
Here are the steps I followed using a trigger but its not happening. Please help. Maybe I am missing something

1. I created a new field of Checkbox type on Contact Object to Flag contact as Key Contact
Field Name : Key_Contact__c
type : Checkbox
Object : Contact


2. The Trigger Class to Link Contacts That Flagged as key Contact when creating an Opportunity.


------------------------------------START------------------------------------------------
trigger LinkContacts on Opportunity (before insert, before update) {
   
set<Id> AccountIds = new set<Id>();
for (Opportunity  o: trigger.new) {
 AccountIds.add(o.AccountId);
}
map<Id, Account> AccountContactMap = new map<Id, Account>();
map<Id, Contact> ContactMap = new map<Id, Contact>();
list<Account> AccConts = new list<Account>();
AccConts = [Select Id, Name, (Select Id, Name, Key_Contact__c from Contacts Where Key_Contact__c = true) from Account where Id IN : AccountIds];
for(Account acc : AccConts){
    AccountContactMap.put(acc.Id, acc);
}

for (Opportunity  o: trigger.new) {
Account Acc = AccountContactMap.get(o.AccountId);
if(Acc != null){
List<Contact> conts = new list<Contact>(Acc.Contacts);
                 map<Id, Contact> ContactMap = new map<Id, Contact>();
                  Contact Con = ContactMap.get(o.ContactId);
if(conts.size() > 0 ){
                   
                    if(Con.Key_Contact__c = true){
                       
                        for(Contact contactFlag : conts){
    ContactMap.put(contactFlag.Id,con );
}
                    }

}
}


}
}

--------------------------------------END-------------------------------------------------