• A Gunale
  • NEWBIE
  • 40 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 8
    Replies
public static void createRecords(Map<Id, AccountTeamMember> accountMp) {
        
        Map<Id, Account> accountMap;
        List<xyz__c> Records = new List<xyz__c>();
        if(!accountMp.isEmpty()) {
            accountMap = new Map<Id, Account> ([SELECT Id, RecordType.Name, 
                                                        (Select Id, Status,AccountId 
                                                         FROM abc__c 
                                                         )
                                               FROM Account 
                                               WHERE Id IN: accountMp.keySet()]);
                                              
                                               
                                                   
                                                 
            for(Id accId : accountMp.keySet()) {
                Account accObj = accountMap.get(accId);
                Id userId = accountMp.get(accId).UserId;
                xyz__c  xyz = new xyz__c();
                xyz.Record__c = accObj.Id;
                xyz.Record1__c = userId;
                xyz.Record2__c = 'Account';
                xyz.External_Id__c = userId+ '_'+accObj.Id;
                Records.add(xyz);
                
                for(abc__c abc: accObj.abc__c){
                    xyz__c  xyz1 = new xyz__c();
                    xyz1.Rcordxyz__c = abc.Id;
                    xyz1.Rcordxyz1__c = userId;
                    xyz1.Rcordxyz2__c = 'abc';
                    xyz1.External_Id__c = userId+ '_'+abc.Id;
                    Records.add(xyz1);
                }                
            }  
                                                
            if(!Records.isEmpty()) {
                try{
                    insert Records;
                } 
                catch(Exception e){
                }
            }
        }  
Hello,
I have a component which has a list of Account records. I just want to collect all selected records ids and pass those to Apex class.

Thank you in advance!

List of Account records
Please help,  My Pd1 Certificate maintenance due date was 10 Dec. I just missed to view and I completed Maintenance module on 15 Dec.
Does it make my Certificate Active ?
 
I have two multipicklist fields. One is in Account object and Another in Opportunity. If Account Multipicklist field has Two values (X,Y) then create two opportunities and update dat value into opportunity multipicklist field. If Account related opportunities has X value then create only one opporunity nd update field with Y.

Thank you.
I have a requirement , Fetch Loggedin User Address in a field.
Any help will be appriciated. 
 
I need to avoid booking at the same time i.e one booking is at 7pm to 8pm and another one is booking at 7:30pm to 8pm.
can anyone help to resolve this
Can anyone tell how to create Table with input fields using aura component.

Thank you....
Hello,
I have a component which has a list of Account records. I just want to collect all selected records ids and pass those to Apex class.

Thank you in advance!

List of Account records
Please help,  My Pd1 Certificate maintenance due date was 10 Dec. I just missed to view and I completed Maintenance module on 15 Dec.
Does it make my Certificate Active ?
 
I have two multipicklist fields. One is in Account object and Another in Opportunity. If Account Multipicklist field has Two values (X,Y) then create two opportunities and update dat value into opportunity multipicklist field. If Account related opportunities has X value then create only one opporunity nd update field with Y.

Thank you.
I need to avoid booking at the same time i.e one booking is at 7pm to 8pm and another one is booking at 7:30pm to 8pm.
can anyone help to resolve this
Can anyone tell how to create Table with input fields using aura component.

Thank you....