• Lakshmi S
  • SMARTIE
  • 599 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 11
    Likes Received
  • 0
    Likes Given
  • 155
    Questions
  • 125
    Replies
I am not getting any selectd options in the SelectOption list to show on my Visual Force page. Beow is the VF snippet and controller.

Example
public class sampleConSubmissions {
    
     String[] submissions = new String[]{};

    public sampleConSubmissions(ApexPages.StandardController controller) {

    }
        
            
        public PageReference test() {
            return null;
        }
            
        public List<SelectOption> getItems() {
            List<SelectOption> options = new List<SelectOption>();
            options.add(new SelectOption('TR00025712016 - Umbr only','TR00025712016 - Umbr only'));
            options.add(new SelectOption('TR00028982016 - Casualty','TR00028982016 - Casualty'));
            options.add(new SelectOption('TR18622016 - Casualty','TR18622016 - Casualty'));
            options.add(new SelectOption('TR20612016 - Property','TR20612016 - Property'));
            return options;
        }
            
        public String[] getsubmissions() {
            return submissions;
        }
            
        public void setsubmissions(String[] submissions) {
            this.submissions = submissions;
        }
    }
 
<apex:selectList value="{!submissions}" multiselect="true">
            <apex:selectOptions value="{!items}"/>
        </apex:selectList><p/>

        <apex:commandButton value="Select Submissions" action="{!test}" rerender="out" status="status"/>
    

    <apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel >
                    <p>You have selected:</p>
                    <apex:dataList value="{!submissions}" var="c">{!c}</apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>

 
Hi Team,

Salesforce Object ID Is Refined to Use Three Characters for Server IDs (Release Update) --> Can someone explain if there is any impact on existing functionality?

Thanks,
Lakshmi.
 
Hi Team,

Enable Faster Account Sharing Recalculation by Not Storing Case and Contact Implicit Child Shares (Releaes Updates) --> Can someone explain about this is there any impact on existing functionality?


Thanks
Lakshmi.
Hi Team,

Salesforce Winter ’24 Release key highlights for Development?


Thanks,
Lakshmi.
Hi Team,

I have designed a detail page for the Account using LWC.
I want to display "Created By & Last Modified By" details in the Lightning-record-view-form.
how can we achieve this request?

Please let me know.

Thanks,
Lakshmi.

 
Hi Team,

I want to override a Standard Edit button with Aura component for one profile and the remaining profiles need to redirect to the Standard Edit button. How to achieve this in Lightning?
Thanks in advance....

Thanks,
Lakshmi.
Hi Team,

Lightning Web Component - Record View Form - How to display Inline edit for each field?

User-added image

Please advise how to customize like standard view with 3 columns.

Thanks
Lakshmi
Hi Team,

We have around 20 process builders on Opportunity, can we convert these into trigger? Is this the best practice?
We need to increase the batch size for the Opportunity mass update.
Please share your thoughts.

Thanks in advance,
Lakshmi.
Hi Team,

We have around 20 process builders on Opportunity, can we convert these into trigger? Is this the best practice?
We need to increase the batch size for the Opportunity mass update.
Please share your suggestions.

Thanks in advance,
Lakshmi.
Hi Team,

I am overriding the standard Account New button with a custom VF page, I want to display 3 input columns in each row, I am getting an alignment issue.

User-added imagePlease let me know anyone how to align in the same size.

Thanks,
Lakshmi.
Hi Team,

I have created a custom LWC component for Account records. I want to override the Account Standard New button with a custom LWC component.
Can anyone help me with this how-to achieve this?

Thanks in advance.
Lakshmi.
Requirement: I want to search Opportunity records based on closed date from the VF page. How to pass the date field to dynamic string query in apex?
I am getting below error.

Error:
unexpected token: '2021-03-01'

Please advise how to resolve this error.
sample code below:
---------------------------
if(closedDate != Null ){
                strFilter += 'AND Close_Date__c ='+closedDate;
  }
 
Hi Team,

What is "Platform Management Tools" for Salesforce?

Please let me know anyone...

Thanks in advance.

Thanks
Lakshmi
Hi Team,
Requirement: Update Account status from Opportunity based on Contract Expiration Date.
1. Contract expiration date >Today - need to update Status=Active.
2. Suppose we have 10 opportunities to an Account, If any one of the opportunity contract expiration date > Today, need to update Account Status=Active else Expired.
Please advise how can we achieve this requirement?

Thanks,
Lakshmi S.
Hi Team,

Is there a way to extract list of Users (with type of access) for Report folders in Salesforce?

Please let me know.
Thanks in Advance!!!

Lakshm S.
Hi Team,

Requirement: Update Account status from Opportunity based on Contract Expiration Date.
1. Contract expiration date >Today - need to update Status=Active.
2. Suppose we have 10 opportunities to an Account, If any one of the opportunity contract expiration date > Today, need to update Account Status=Active else Expired.
Please advise how can we achieve this requirement?

Thanks,
Lakshmi S.
Hi Team,

How to add Files related list in visualforce detail page? (Lightning Experience not showing "Add Files" option, In Standard lightning files if we click on the "Add Files" it will redirect to Libraries.)
Now below code is redirecting to local system.
I have used below code
<apex:relatedList subject="{!Custom_Obj__c}" list="AttachedContentDocuments" />

Please advise.

Thanks
Hi Team,

Requirement : I want to display all objects last activity date using visualforce page or soql ?
Please advise how can we achieve this using SOQL or Visualforce pages?
Please let me know anyone..

Thanks in Advance
Lakshmi S
Hi Team,

I have installed some packages in my org, related to those packages there are 4 or 5 triggers in Account object. I need to write a custom trigger on Account object.

Please advise can we write custom trigger, if we have triggers on same object related to packages ?

Thanks,
Lakshmi S.
Hi Team,

I am calling batch apex from trigger.
I am updating a value in Account from custom object. Created two records in custom object, now two batches are running. But one value is in updated in account, another value is not updated.
Please advsie how can we resolve this issue ?

Thanks,
Lakshmi S.
Hi Team,

I am calling batch apex using trigger after deleting the record, but Start method returns null.
How to query deleted records in batch apex start method.
Trigger :
----------

if(Trigger.isDelete){
                
   Database.executeBatch(new BatchUpdateAcct(Trigger.OldMap),1);
               
}

Batch Class
-------------

global class BatchUpdateAcct implements Database.Batchable<sObject> {
    
    Map<Id,Object__c> mapRecs = new Map<Id,Object__c>();
    
    global BatchUpdateAcct(Map<Id,Object__c> oldValue){
        mapRecs = oldValue;
       
    }
    
    global Database.QueryLocator start (Database.BatchableContext BC){
        System.debug('----Start Method-----'+mapRecs.keySet());
        return Database.getQueryLocator([Select id,Name from Object__c where id in :mapRecs.KeySet()]);
    }
    
    global void execute (Database.BatchableContext BC, List<Object__c> objList){
        
    }
    
    global void finish(Database.BatchableContext BC){
        
    }

}

Please advise any one how to resolve this issue ?
Is it possible to call the batch apex after deleting the records ?


Thanks,
Lakshmi S
 
Hi Team,

AutoRabit is usful for small teams like 1 or 2 developers in salesforce.

Please let me know any one.

Thanks,
Lakshmi.
Hi All,

Q). One object (s1) & 3 tasks (t1, t2, t3) are there. Each task performing discount related stuff.
   Write a trigger that should calculate the sum of 3 tasks.  And if any task is modified than trigger should fire automatically & perform the same.


Can any one reply for this post..
Thanks in advance
 
Hi All,

Q). what is the difference between actionFunction and actionSupport, Explain with funcionality?

can anyone reply for this post...
Thanks in advance..
Hi All,

Q). 3 users with same profile (R/W permissions), need to remove Read permission for one user, how can we achieve that?

Can anyone reply for this post...
Thanks in advance.
Hi All,

Q). What is a future method ? When we are going to use Future methods? Example program for Future method and Schedulable class for Future method?

Give me reply anyone.....
Hi All,

Example Program for batch apex chaining and scheduling?
HI All,

Q). What is a Batch Apex,Queueable Apex and @Future methods?, What are the differences between them and when we are going to use these classes?
Can anyone explain these classes.......
 
Hi Team,

Lightning Web Component - Record View Form - How to display Inline edit for each field?

User-added image

Please advise how to customize like standard view with 3 columns.

Thanks
Lakshmi
Hi Team,

I am overriding the standard Account New button with a custom VF page, I want to display 3 input columns in each row, I am getting an alignment issue.

User-added imagePlease let me know anyone how to align in the same size.

Thanks,
Lakshmi.
Hi Team,

Is there a way to extract list of Users (with type of access) for Report folders in Salesforce?

Please let me know.
Thanks in Advance!!!

Lakshm S.
Hi Team,

Requirement: Update Account status from Opportunity based on Contract Expiration Date.
1. Contract expiration date >Today - need to update Status=Active.
2. Suppose we have 10 opportunities to an Account, If any one of the opportunity contract expiration date > Today, need to update Account Status=Active else Expired.
Please advise how can we achieve this requirement?

Thanks,
Lakshmi S.
Hi Team,

I am calling batch apex using trigger after deleting the record, but Start method returns null.
How to query deleted records in batch apex start method.
Trigger :
----------

if(Trigger.isDelete){
                
   Database.executeBatch(new BatchUpdateAcct(Trigger.OldMap),1);
               
}

Batch Class
-------------

global class BatchUpdateAcct implements Database.Batchable<sObject> {
    
    Map<Id,Object__c> mapRecs = new Map<Id,Object__c>();
    
    global BatchUpdateAcct(Map<Id,Object__c> oldValue){
        mapRecs = oldValue;
       
    }
    
    global Database.QueryLocator start (Database.BatchableContext BC){
        System.debug('----Start Method-----'+mapRecs.keySet());
        return Database.getQueryLocator([Select id,Name from Object__c where id in :mapRecs.KeySet()]);
    }
    
    global void execute (Database.BatchableContext BC, List<Object__c> objList){
        
    }
    
    global void finish(Database.BatchableContext BC){
        
    }

}

Please advise any one how to resolve this issue ?
Is it possible to call the batch apex after deleting the records ?


Thanks,
Lakshmi S
 
Hi Team,

Batch Apex Mass Upload Issue ?
Requirement : Need to Update Account fileds from Custom object based on condition.For 1 record we need to update around 5000 Account records with some value.
How can we achieve this request ?
I have tried with trigger and batch apex, for 1 record it is working. But mass upload it is not working.

Please advise any one.

Thanks,
Lakshmi S.
Hi Team,

Below code is not covered 75% code coverage, please advise any one how to resolve this issue ?
Handler class
-------------------------
public with sharing class ClientHandlerCtrl {
    
    public static boolean insertRecursiveStop = true;
    public static boolean updateRecursiveStop = true;
    
    public static void ClientInsert(Map<Id,Client__c> newMap){
        
        try{
            Set<String> usrName = new Set<String>();
        
            for(ID clientIds : newMap.keySet()){
                            
                Client__c client = newMap.get(clientIds);
                if(client.Client_Manager__c != Null){
                    usrName.add(client.Client_Manager__c);
                }
            }
            
            List<User> userList = [Select id,Name from User where name in :usrName and IsActive=true];
            
            for(ID clientIds : newMap.keySet()){
                Client__c client = newMap.get(clientIds);
                
                                
                    if(client.Client_Manager__c != Null && userList.size() > 0){
                        
                        for(user usr : userList){
                        
                        if(client.Client_Manager__c == usr.Name){
                            client.Client_Manager_Lookup__c = usr.Id;
                        }
                    }
                                        
                }
                else
                    {
                            client.Client_Manager_Lookup__c = Null;
                    }
                
            }
            
        }
        catch(Exception ex){
            System.debug('Exception caught in client insert method :'+ex.getMessage());
        }
    }
    
    public static void ClientUpdate(Map<Id,Client__c> updateMap){
        
        try{
            
            Set<String> usrName = new Set<String>();
        
            for(ID clientIds : updateMap.keySet()){
                            
                Client__c client = updateMap.get(clientIds);
                if(client.Client_Manager__c != Null){
                    usrName.add(client.Client_Manager__c);
                }
            }
            
            List<User> userList = [Select id,Name from User where name in :usrName and IsActive=true];
            
            for(ID clientIds : updateMap.keySet()){
                Client__c client = updateMap.get(clientIds);
                
                                
                    if(client.Client_Manager__c != Null && userList.size() > 0){
                        
                        for(user usr : userList){
                        
                        if(client.Client_Manager__c == usr.Name){
                            client.Client_Manager_Lookup__c = usr.Id;
                        }
                    }
                                        
                }
                else
                    {
                            client.Client_Manager_Lookup__c = Null;
                    }
                
            }
        }
        catch(Exception ex){
            System.debug('Exception caught in client update method :'+ex.getMessage());
        }
    }
    
}


Test Class
----------------
@isTest
private class TestClientTrigger {
    
    @testSetup
    private static void createTestData(){
        
        List<User> usrList = new List<User>();
        
        for(Integer i=0; i<3 ; i++){
            User usr = new User();
            usr.ProfileId = [SELECT Id FROM Profile WHERE Name = 'System Administrator'].Id;
           
            if(i==0){
                usr.FirstName = 'Lakshmi';
                usr.LastName = 'S';
                usr.Email = 'lakshmis@gmail.com';
                usr.Username = 'lakshmis@gmail.com';
                usr.Alias = 'laks';
            }
            else if(i==1){
                usr.FirstName = 'Ajay';
                usr.LastName = 'D';
                usr.Email = 'Ajayd@gmail.com';
                usr.Username = 'Ajayd@gmail.com';
                usr.Alias = 'ajayd';
            }
            else if(i==2){
                usr.FirstName = 'Naresh';
                usr.LastName = 'K';
                usr.Email = 'nareshk@gmail.com;
                usr.Username = 'nareshk@gmail.com';
                usr.Alias = 'naresh';
            }
            
            usr.CompanyName = 'TEST';
            usr.Title = 'title';
            usr.TimeZoneSidKey = 'America/Los_Angeles';
            usr.EmailEncodingKey = 'UTF-8';
            usr.LanguageLocaleKey = 'en_US';
            usr.LocaleSidKey = 'en_US';
            
            usrList.add(usr);
        }
        
        insert usrList;
        
        Account acc = new Account();
        acc.Name = 'Dummy Account';
        insert acc;
        
        Map<Id,Client__c> fsList = new Map<Id,Client__c>();
        
        for(Integer i=0 ; i<3 ; i++){
            Client__c fs = new Client__c();
            fs.Account__c = acc.Id;
            if(i==0){
                fs.Client_Manager__c = 'Lakshmi S';
            }
            else if(i==1){
                fs.Client_Manager__c = 'Ajay D';
            }
            else if(i==2){
                fs.Client_Manager__c = 'Naresh K';
            }
            
            fsList.put(fs.Id,fs);
            
        }
        insert fsList.values();
    }
    
   
    
    @isTest
    private static void updateTest(){
        
        Account acc = [Select id from account];
        
        Client__c fs = [Select id,Client_Manager__c from Client__c limit 1];
        fs.Client_Manager__c = 'Naresh K';
        update fs;
        
    }
    
}
Please let me know.

Thanks,
Lakshmi S

 
Hi Team,

Can we use SOQL Query in inner for loop ?

EX:
for(Opportunity opp : Trigger.New){
        
        for(User usr : [Select id from user where name =:opp.Manager__c]){

            opp.Manager_Lookup__c = usr.Id;

        }
    }
Please advise.

Thanks,
Lakshmi S.
 
Hi Team,

We are overriding Standard detail page using visualforce page in that we are added related lists " Open Activities" and "Activity History". In Lightning after adding Event or Task the detail page is not refreshed and newly added Event or Task not visible in the detail page.

Please let me know how can we resolve this issue.

Thanks in Advance.

Regards,
Lakshmi S.
Hi Team,

Visualforce page inputfield reRender based on condition, i am getting alignment issue. Please check and let me know how can we resolve this issue .
<apex:pageBlockSectionItem >
                    <Label>Account currently use or Not </Label>
                    <apex:actionRegion >
                        <apex:inputField value="{!Account.Account_currently_use__c}">
                            <apex:actionSupport event="onchange" reRender="desc" />
                        </apex:inputField>
                    </apex:actionRegion>
                    
 </apex:pageBlockSectionItem>
  <apex:outputPanel id="desc" layout="None" >
                <apex:pageBlockSectionItem rendered="{!if(Account.Account_currently_use__c == 'Yes',true,false)}" >
                    Acct currently use(Des)  
                    <apex:inputTextarea cols="50" rows="3" value="{!Account.Acct_currently_use_Des__c}"/>
               </apex:pageBlockSectionItem>
 </apex:outputPanel>
Note : I am using these two fields in same pageblocksection.
Alignment is not showing correctly.

 
Hi Team,

How can we do Visualforce page block section hide & enable based on custom object picklist value ?


Thanks,
Lakshminarasimha.

 
Hi Team,

Requirement : We have two multiselect picklist fields called Country and Region.Based on country we need to update the Region.
Ex : Country - If we Select -- India, Ireland, Sweden, In Region we need to update like - MEA,UKI,Nordics.
Note : Both are Multiselect picklist fields and pre defined picklist values.
How can we achieve that.
Please let me know anyone.

Thanks,
Lakshmi.
 
Hi Team,

We are using trigger for updating count and sum from child to parent object. I am getting issue with one scenario.
Ex :
Parent -  A
Parent - B

Child -1.

Scenario : 1
------------------
Child -1 attached with Parent - A, now its updating Parent - A data.

Scenario : 2
---------------------
Child -1 attached with Parent- A, now i am updating the lookup field with Parent - B, Now Parent - B updating with child data but Parent - A data is not erased still it is showing Child - 1 data (sum and count).

Please let me know how can we resolve this issue.

Code :
----------
public static void rollupSumUpdate(Map<Id, child1__c> newRecs, Map<Id, child1__c> oldRecs){
   
        try{
            
            Set<String> parentIds = new Set<String>();
            
            for(Id chIds : newRecs.keySet()){
                
                child1__c tr = newRecs.get(chIds);
                
                if(tr.parentId__c != Null){
                    
                    parentIds.add(tr.parentId__c);
                    
                    System.debug('******If block -  Update Method - parentIds : **********'+parentIds);
                }
                else
                {
                    parentIds.add(oldRecs.get(chIds).parentId__c);
                    System.debug('******else block -  Update Method - parentIds : **********'+parentIds);
                }
                
            }
            
            Map<Id,parent__c> mapToUpdate = new Map<Id,parent__c>();
            
            if(parentIds.size() > 0){
                
                Map<Id,parent__c> fsOppMap = new Map<Id,parent__c>([Select Id,Amount__c,Trade_Count__c from parent__c where Id In :parentIds]);
                
                parent__c fsOpp = new parent__c();
                
                List<AggregateResult> ar = [Select parentId__c,Count(Id)tradeCount,Sum(Annual_Recurring_Revenue__c)arrSum,Sum(Non_Recurring_Revenue__c)nrrSum 
                                           from child1__c where parentId__c In :parentIds Group By parentId__c];
                System.debug('--------Aggregate Result : '+ar);
                
                If(ar.size() > 0){
                    
                    for(AggregateResult res : ar){
                        
                        Id fsId = (Id)res.get('parentId__c');
                        fsOpp = fsOppMap.get(fsId);
                        
                        fsOpp.Trade_Count__c = (Integer)res.get('tradeCount');
                        System.debug('---Update Method-----Trade Count : '+fsOpp.Trade_Count__c);
                        
                        Decimal arr = (Decimal)res.get('arrSum');
                        System.debug('----Update Method----ARR : '+arr);
                        
                        Decimal nrr = (Decimal)res.get('nrrSum');
                        System.debug('----Update Method----NRR : '+nrr);
                        
                        fsOpp.Amount__c = arr + nrr ;
                        System.debug('----Update Method----Amount : '+fsOpp.Amount__c);
                        
                        mapToUpdate.put(fsOpp.Id,fsOpp);
                        
                    }
                }
                else
                {
                    for(Id ids : parentIds){
                        
                        fsOpp = new parent__c(id = ids); 
                        
                        fsOpp.Trade_Count__c = Null;
                        System.debug('----Update Method--Else Block--Trade Count : '+fsOpp.Trade_Count__c);
                        
                        fsOpp.Amount__c = 0;
                        System.debug('----Update Method--Else Block--Amount : '+fsOpp.Amount__c);
                        
                        mapToUpdate.put(fsOpp.Id,fsOpp);
                        
                    }
                }
                
            }
            
            Database.SaveResult[] res = Database.update(mapToUpdate.values(), false);
            
            
        }
        catch(Exception ex){
            System.debug('---Exception caught in Rollup Sum Update Method :'+ex.getLineNumber());
        }
        
    }
Please let me know any one..

Thanks,
Lakshmi