• data.migration1.3948976100296348E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
Hi,

I have some problam install TimbaSurveys it's showing error is
" Missing Organization Feature: Campaign
null"
please help any one it's very urgent ...........


Thnaks advance
Hi,

i am facing *** Skipped 799802 bytes of detailed log*********

above error in debug logs 

when i selecting two months range the debug logs skipped.....

please help on this very urgent 

Thanks,
Venu
Hi,

This is logic, here only change logic 


if((Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c != null) && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey))
                                continue;
                    else if((Assignment.Effective_Date__c != null && Assignment.Deactivation_Date__c == null) && Assignment.Effective_Date__c <= EndDatesMap.get(MonthKey))
                                continue;
                    else if((Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c ==null) || (Assignment.Effective_Date__c<=EndDatesMap.get(MonthKey) && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey)) || (Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey)) || (Assignment.Deactivation_Date__c == null && Assignment.Effective_Date__c <= EndDatesMap.get(MonthKey)))
Hi,

I am selcting from month to to month in my report showing correct data for one month

am selecting four months display wrong data..

for example am selecting from month:FEB to month:Feb it's  show correct data

now am again selecting from month:JAN to month:APR it's show wrog data.
 max selecting four months range........


please help on this

Thanks,




Hi All,

I am creating search functionality it's working fine..

but when i click search button i'ts time taken after records display..

i want quick response .....
please help on this.....

Thanks advance.............
Here my code
public without sharing class CustomerSearchController
{
       
   
       public PageReference search()
    {      
        try{
        pbflag=true;
        boolean errflag=false;
       
        if(commonAppSettings__c.getInstance('global')!=null)
            size=Integer.valueOf(commonAppSettings__c.getInstance('global').Pagination_Size__c); 
        String companycode=LoggedInUser.companyName;
        accIdSet = new Set<Id>();
        //Enters into the If loop if the search is of CustomerCode and the results are stored in StandardSetController for pagination.
        if(selectedOption == CODE_SEARCH)
          { 
         // addToDVLFlag=true;            
                 
                  if(accnt != null && (accnt.Customer_Code__c == null || accnt.Customer_Code__c == ''))
                  {
                          ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_Customer_Code);
                          ApexPages.addMessage(myMsg);
                          pbflag = false;
                          errflag = true;                       
                          return null;
                  }
                  //Gets the customer record based on the customercode entered and the organization of the user.
                  AllSearchCustomers = [select a.Id, a.Name, a.Speciality__c, a.Qualification1__c, a.PersonMobilePhone, a.LastName, a.Hospital_Type__c, a.RecordType.Name, a.searchable__c,a.IsPersonAccount,
                                        a.FirstName, a.Customer_Code__c, (Select Id, Primary__c,Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,Address__r.Address_Line1__c From Address_junctions__r),
                                        (select Id,Target__r.User__r.name,Target__r.User__r.Division,Target__r.User__r.EmployeeNumber from Assignments__r)                      
                                        From Account a               
                                        where a.Customer_Code__c=:accnt.Customer_Code__c and RecordType.Name=:selectedCustomerType and Organization__c=:companycode AND Searchable__c=true limit 1];                
                 system.debug('-----AllSearchCustomers -------'+AllSearchCustomers.size());
                  List<Address_Junction__c> addList = new List<Address_Junction__c>();
                  List<Assignment__c> assgnList = new List<Assignment__c>();
                 
                  if(AllSearchCustomers != null && !AllSearchCustomers.isEmpty()) {
                    for(Account a : AllSearchCustomers)
                    {
                        addList = a.Address_junctions__r;
                        assgnList = a.Assignments__r;
                    }
                  }
                 
                  if(assgnList != null) {
                    System.debug('Total Assignments:'+assgnList.size());
                  }
                 
                  if(addList !=null && !addList.isEmpty())                                                               
                      primaryAddress = true;
                  else
                      primaryAddress = false;               
                  Set<Id> userIds = new Set<Id>();
                  assignTBMValues(AllSearchCustomers);
          }
          //Enters into the If loop if the search is of FilterCriteria and the results are stored in StandardSetController for pagination.       
          else if(selectedOption == FILTER_SEARCH && personAccount==true)  
          {
              // addToDVLFlag=true;
               primaryAddress = true;
              
            /*    if(accnt != null && (accnt.Last_Name__c==null || accnt.Last_Name__c==''))
              {
                  ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_Last_Name);
                  ApexPages.addMessage(myMsg);
                  errflag=true; 
                  pbflag = false;            
              }
              if(accnt != null && (accnt.First_Name__c == null || accnt.First_Name__c == ''))
              {
                  ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_First_Name);
                  ApexPages.addMessage(myMsg);
                  errflag=true; 
                  pbflag = false;            
              }
       
                
               Addjunduplist =[Select Id, Primary__c,Account__C,Account__r.name,Account__r.RecordType.Name,Account__r.Customer_Code__c,Account__r.lastname,Account__r.firstname,Account__r.Speciality__c ,Account__r.Qualification1__c,
                            Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,Address__r.Address_Line1__c From Address_junction__c
                                        WHERE
                                         Account__r.name LIKE:accnt.first_name__c +'%'+accnt.Last_Name__c+'%' and Account__r.RecordType.Name=:selectedCustomerType and Account__r.Organization__c=:companycode
                                                                                                               and Account__r.searchable__c = true];
                         system.debug('--------------Addjunduplist-----------'+Addjunduplist);     
                assignTBMDetails(Addjunduplist);*/
               
               
             string FName='%'+accnt.first_name__c +'%';
             String MName='%'+accnt.Middle_Name__c+'%';
             string LName='%'+accnt.last_name__c+'%';

              system.debug('--------------------FName--------------------'+Fname);
             String Acclist='Select Id, Primary__c,Account__C,Account__r.name,Account__r.RecordType.Name,Account__r.Customer_Code__c,Account__r.lastname,Account__r.firstname,Account__r.Middle_Name__c ,'+
                   'Account__r.Speciality__c ,Account__r.Qualification1__c,Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,'+
                   'Address__r.Address_Line1__c,Address__r.Address_Line2__c From Address_junction__c '+
                   'WHERE  Account__r.RecordType.Name=:selectedCustomerType  '+
                   ' AND Account__r.firstname LIKE: FName '+
                   ' AND Account__r.lastname LIKE: LName ';
                  
            if(selectedState!=Null)
               Acclist+=' AND Address__r.State__r.Name=:selectedState';
         
            if(selectedCity!=Null)
                    Acclist+=' AND Address__r.City__r.Name=:selectedCity' ;
             if(accnt.Middle_Name__c!=Null && accnt.Middle_Name__c!='')     
                     Acclist+=' AND Account__r.Middle_Name__c LIKE : MName';
             
               system.debug('--------------sobjects ----LName------'+Database.query(Acclist));
               addjunlistfinal = Database.query(Acclist);                         
               assignTBMDetails(addjunlistfinal);
             //  addjunlistfinal.clear();
                                                                         
                      
        
                  } // End FILTER_SEARCH && personAccount==true
                  
   


trigger UpdateReportingFieldsOnDCR on DCR__c (before update) {
   
    if(!Test.isRunningTest()){
        Map<ID,DCR__c> requiredDCRMap = new Map<Id,DCR__c>();
        Map<Date,DCR__c> dateDCRMap = new Map<Date,DCR__c>();
        List<UserTerritory> userTerritoryList = new List<UserTerritory>(); 
        List<Id> userTerritoryIdList = new List<Id>(); 
        Set<Id> aboveBelowUserSet = new Set<Id>();
        Set<Id> JFWUserSet = new Set<Id>();
        User loggedInUser = CommonUtil.getUserDetails();
        Map<Date,Set<Id>> plannedMTPDoctorIdsMap = new Map<Date,Set<Id>>();
        Map<Date,Set<Id>> dcrJunctionDoctorIdsMap = new Map<Date,Set<Id>>();
        Id CurrentUserId ;
        List<User> abovelist;
        List<User> belowlist;
       
        Map<Id,TerritoryWrapper> mapTerritories = commonUtil.loadTerritories();
        System.debug('mapTerritories-----'+mapTerritories);
        for(DCR__c dcrNew : Trigger.New){
            System.debug('dcrNew-----'+dcrNew);
            if(dcrNew.OwnerId == dcrNew.User__c && dcrNew.Status__c == 'Submitted'){
                dcrNew.mtpDay__c = commonUtil.getDayOfTheWeek(dcrNew.Date__c);
                requiredDCRMap.clear();
                dateDCRMap.clear();
                System.debug('dcrNew===='+dcrNew);
                requiredDCRMap.put(dcrNew.Id,dcrNew);
                dateDCRMap.put(dcrNew.Date__c,dcrNew);
                CurrentUserId = dcrNew.User__c;
                userTerritoryList.clear();
                userTerritoryIdList.clear();
                for(UserTerritory ut :[select Id, TerritoryId from UserTerritory where UserId=:CurrentUserId]){
                    userTerritoryList.add(ut);
                    userTerritoryIdList.add(ut.TerritoryId);
                }
                System.debug('userTerritoryIdList-----'+userTerritoryIdList);
                System.debug('userTerritoryList-----'+userTerritoryList);
               
                abovelist = commonUtil.usersAboveLoggedInUser(userTerritoryList,mapTerritories);
                if(abovelist != null && !abovelist.isEmpty()){
                    for(User user : abovelist){
                        aboveBelowUserSet.add(user.Id);
                    }
                }
                System.debug('aboveBelowUserSet-----'+aboveBelowUserSet);
               
                belowlist = commonUtil.usersBelowLoggedInUser(userTerritoryList,mapTerritories);
                if(belowlist!=null && !belowlist.isEmpty()){
                    for(User user : belowlist){
                        aboveBelowUserSet.add(user.Id);
                    }
                }
                System.debug('aboveBelowUserSet*****'+aboveBelowUserSet);
               
                List<Territory> loggedInUsersListOfTerritories = [select Id, Name, Divison_Code__c from Territory where Id IN:userTerritoryIdList limit 1];
                System.debug('loggedInUsersListOfTerritories==='+loggedInUsersListOfTerritories);
                if(loggedInUsersListOfTerritories!=null && !loggedInUsersListOfTerritories.isEmpty()){
                    for(JFW__c jfw : [select Id,Name,JFW__c,Division__c,User__r.Name,User__c,User__r.Designation__c from JFW__c
                                        where JFW__c=true AND Division__c=:loggedInUsersListOfTerritories.get(0).Divison_Code__c]){
                        System.debug('jfw===='+jfw);
                        JFWUserSet.add(jfw.User__c);
                    }
                }
                System.debug('JFWUserSet*****'+JFWUserSet);
               
                System.debug('requiredDCRMap===='+requiredDCRMap);
                System.debug('keyset===='+requiredDCRMap.KeySet());
                System.debug('dateDCRMap===='+dateDCRMap);
                Set<Id> jfwUserIds = new Set<Id>();
                Set<Id> aboveBelowUserIds = new Set<Id>();
                List<DCR__c> dcrList = [select id, name, date__c, (select id, name from dcr_jfw__r) from dcr__c where id in :requiredDCRMap.KeySet()];
                System.debug('dcrList===='+dcrList);
                System.debug('dcrList===='+dcrList.get(0).dcr_jfw__r);
                for(DCR_JFW__c  dcrJFW :[select Id,User1__c,User1__r.Name,User2__c,User2__r.Name,DCR__c from DCR_JFW__c where DCR__c IN :requiredDCRMap.keySet()]){
                    System.debug('dcrJFW==='+dcrJFW);
                    if(JFWUserSet.contains(dcrJFW.User2__c)){  /////addded to have unique names of jfw user list
                        System.debug('jfwUserIds==='+jfwUserIds);
                        if(jfwUserIds.add(dcrJFW.User2__c)){
                            DCR__c dcr = requiredDCRMap.get(dcrJFW.DCR__c);
                            if(dcr.Joint_Work_With__c != null && dcr.Joint_Work_With__c.length()>0 && dcr.Joint_Work_With__c.indexOf(dcrJFW.User2__r.Name) == -1){
                                dcr.Joint_Work_With__c = dcr.Joint_Work_With__c + ',' + dcrJFW.User2__r.Name;
                            }
                            else{
                                dcr.Joint_Work_With__c = dcrJFW.User2__r.Name;
                            }
                        }
                    }
                    else if(aboveBelowUserSet.contains(dcrJFW.User2__c)){
                        System.debug('aboveBelowUserIds==='+aboveBelowUserIds);
                        if(aboveBelowUserIds.add(dcrJFW.User2__c)){  ////added to have unique names of work with column
                            DCR__c dcr = requiredDCRMap.get(dcrJFW.DCR__c);
                            if(dcr.Work_With__c != null && dcr.Work_With__c.length()>0 && dcr.Work_With__c.indexOf(dcrJFW.User2__r.Name) == -1){
                                dcr.Work_With__c = dcr.Work_With__c + ',' + dcrJFW.User2__r.Name;
                            }
                            else{
                                dcr.Work_With__c = dcrJFW.User2__r.Name;
                            }
                        }
                    }
                }//////for loop ends
               
                List<Date> dcrDates = new List<Date>();
                for(DCR__c dcr : requiredDCRMap.Values()){
                    dcrDates.add(dcr.Date__c);
                }
                System.debug('dcrDates===='+dcrDates);
               
                Set<String> areasPlannedSet = new Set<String>();
                for(MTP__c mtp : [select Id,Date__c,(select Id,Assignment__c,Assignment__r.Account__r.RecordType.Name,Assignment__r.Account__c,Patch__r.Name,Patch__c,ABM_Name__c,TBM_Name__c from MTP_Junctions__r) from MTP__c where Date__c IN:dcrDates AND Target__r.User__c=:CurrentUserId]){
                    String plannedWith = '';
                    String areasPlanned = '';
                    System.debug('mtp==='+mtp);
                    for(MTP_Junction__c mtpJunc : mtp.MTP_Junctions__r){
                        System.debug('mtpJunc==='+mtpJunc);
                        if(mtpJunc.Assignment__c !=null && mtpJunc.Assignment__r.Account__r.RecordType.Name == 'Doctor'){
                            if(!plannedMTPDoctorIdsMap.isEmpty() && plannedMTPDoctorIdsMap.containskey(mtp.Date__c)){
                                plannedMTPDoctorIdsMap.get(mtp.Date__c).add(mtpJunc.Assignment__r.Account__c);
                            }
                            else{
                                Set<Id> idSet= new Set<Id>();
                                idSet.add(mtpJunc.Assignment__r.Account__c);
                                plannedMTPDoctorIdsMap.put(mtp.Date__c,idSet);
                            }
                        }
                        if(plannedWith.length() != 0){
                            if(mtpJunc.ABM_Name__c != null && mtpJunc.ABM_Name__c.length() > 0 && plannedWith.indexOf(mtpJunc.ABM_Name__c) == -1){
                                plannedWith = plannedWith + ',' + mtpJunc.ABM_Name__c;
                            }
                            if(mtpJunc.TBM_Name__c != null && mtpJunc.TBM_Name__c.length() > 0 && plannedWith.indexOf(mtpJunc.TBM_Name__c) == -1){
                                plannedWith = plannedWith + ',' + mtpJunc.TBM_Name__c;
                            }
                        }////if ends
                        else{
                            if(mtpJunc.ABM_Name__c != null && mtpJunc.ABM_Name__c.length() > 0){
                                plannedWith = plannedWith + mtpJunc.ABM_Name__c;
                            }
                            if(plannedWith.length() > 0){
                                plannedWith = plannedWith + ',' + mtpJunc.TBM_Name__c;
                            }
                            else{
                                plannedWith = plannedWith + mtpJunc.TBM_Name__c;
                            }
                        }////else ends  
                       
                        if(mtpJunc.Patch__c != null && areasPlannedSet.add(mtpJunc.Patch__r.Name)){/////added to have unique names of areas planned
                            if(areasPlanned.length() != 0){
                                if(mtpJunc.Patch__c != null)
                                    areasPlanned = areasPlanned + ',' + mtpJunc.Patch__r.Name;
                            }
                            else{
                                if(mtpJunc.Patch__c != null)
                                    areasPlanned = areasPlanned + mtpJunc.Patch__r.Name;
                            }
                        }
                       
                
Hi,

I am selcting from month to to month in my report showing correct data for one month

am selecting four months display wrong data..

for example am selecting from month:FEB to month:Feb it's  show correct data

now am again selecting from month:JAN to month:APR it's show wrog data.
 max selecting four months range........


please help on this

Thanks,




Hi,

I have some problam install TimbaSurveys it's showing error is
" Missing Organization Feature: Campaign
null"
please help any one it's very urgent ...........


Thnaks advance
Hi, I want to connect Eclipse IDE with my Salesforce Org. When I give my credentials, it says "unable to fetch organization details". Can anyone help to solve this issue?
 screenshot
Hi,

This is logic, here only change logic 


if((Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c != null) && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey))
                                continue;
                    else if((Assignment.Effective_Date__c != null && Assignment.Deactivation_Date__c == null) && Assignment.Effective_Date__c <= EndDatesMap.get(MonthKey))
                                continue;
                    else if((Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c ==null) || (Assignment.Effective_Date__c<=EndDatesMap.get(MonthKey) && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey)) || (Assignment.Effective_Date__c == null && Assignment.Deactivation_Date__c > EndDatesMap.get(MonthKey)) || (Assignment.Deactivation_Date__c == null && Assignment.Effective_Date__c <= EndDatesMap.get(MonthKey)))
Hi,

I am selcting from month to to month in my report showing correct data for one month

am selecting four months display wrong data..

for example am selecting from month:FEB to month:Feb it's  show correct data

now am again selecting from month:JAN to month:APR it's show wrog data.
 max selecting four months range........


please help on this

Thanks,




Hi All,

I am creating search functionality it's working fine..

but when i click search button i'ts time taken after records display..

i want quick response .....
please help on this.....

Thanks advance.............
Here my code
public without sharing class CustomerSearchController
{
       
   
       public PageReference search()
    {      
        try{
        pbflag=true;
        boolean errflag=false;
       
        if(commonAppSettings__c.getInstance('global')!=null)
            size=Integer.valueOf(commonAppSettings__c.getInstance('global').Pagination_Size__c); 
        String companycode=LoggedInUser.companyName;
        accIdSet = new Set<Id>();
        //Enters into the If loop if the search is of CustomerCode and the results are stored in StandardSetController for pagination.
        if(selectedOption == CODE_SEARCH)
          { 
         // addToDVLFlag=true;            
                 
                  if(accnt != null && (accnt.Customer_Code__c == null || accnt.Customer_Code__c == ''))
                  {
                          ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_Customer_Code);
                          ApexPages.addMessage(myMsg);
                          pbflag = false;
                          errflag = true;                       
                          return null;
                  }
                  //Gets the customer record based on the customercode entered and the organization of the user.
                  AllSearchCustomers = [select a.Id, a.Name, a.Speciality__c, a.Qualification1__c, a.PersonMobilePhone, a.LastName, a.Hospital_Type__c, a.RecordType.Name, a.searchable__c,a.IsPersonAccount,
                                        a.FirstName, a.Customer_Code__c, (Select Id, Primary__c,Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,Address__r.Address_Line1__c From Address_junctions__r),
                                        (select Id,Target__r.User__r.name,Target__r.User__r.Division,Target__r.User__r.EmployeeNumber from Assignments__r)                      
                                        From Account a               
                                        where a.Customer_Code__c=:accnt.Customer_Code__c and RecordType.Name=:selectedCustomerType and Organization__c=:companycode AND Searchable__c=true limit 1];                
                 system.debug('-----AllSearchCustomers -------'+AllSearchCustomers.size());
                  List<Address_Junction__c> addList = new List<Address_Junction__c>();
                  List<Assignment__c> assgnList = new List<Assignment__c>();
                 
                  if(AllSearchCustomers != null && !AllSearchCustomers.isEmpty()) {
                    for(Account a : AllSearchCustomers)
                    {
                        addList = a.Address_junctions__r;
                        assgnList = a.Assignments__r;
                    }
                  }
                 
                  if(assgnList != null) {
                    System.debug('Total Assignments:'+assgnList.size());
                  }
                 
                  if(addList !=null && !addList.isEmpty())                                                               
                      primaryAddress = true;
                  else
                      primaryAddress = false;               
                  Set<Id> userIds = new Set<Id>();
                  assignTBMValues(AllSearchCustomers);
          }
          //Enters into the If loop if the search is of FilterCriteria and the results are stored in StandardSetController for pagination.       
          else if(selectedOption == FILTER_SEARCH && personAccount==true)  
          {
              // addToDVLFlag=true;
               primaryAddress = true;
              
            /*    if(accnt != null && (accnt.Last_Name__c==null || accnt.Last_Name__c==''))
              {
                  ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_Last_Name);
                  ApexPages.addMessage(myMsg);
                  errflag=true; 
                  pbflag = false;            
              }
              if(accnt != null && (accnt.First_Name__c == null || accnt.First_Name__c == ''))
              {
                  ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, Label.Mandatory_First_Name);
                  ApexPages.addMessage(myMsg);
                  errflag=true; 
                  pbflag = false;            
              }
       
                
               Addjunduplist =[Select Id, Primary__c,Account__C,Account__r.name,Account__r.RecordType.Name,Account__r.Customer_Code__c,Account__r.lastname,Account__r.firstname,Account__r.Speciality__c ,Account__r.Qualification1__c,
                            Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,Address__r.Address_Line1__c From Address_junction__c
                                        WHERE
                                         Account__r.name LIKE:accnt.first_name__c +'%'+accnt.Last_Name__c+'%' and Account__r.RecordType.Name=:selectedCustomerType and Account__r.Organization__c=:companycode
                                                                                                               and Account__r.searchable__c = true];
                         system.debug('--------------Addjunduplist-----------'+Addjunduplist);     
                assignTBMDetails(Addjunduplist);*/
               
               
             string FName='%'+accnt.first_name__c +'%';
             String MName='%'+accnt.Middle_Name__c+'%';
             string LName='%'+accnt.last_name__c+'%';

              system.debug('--------------------FName--------------------'+Fname);
             String Acclist='Select Id, Primary__c,Account__C,Account__r.name,Account__r.RecordType.Name,Account__r.Customer_Code__c,Account__r.lastname,Account__r.firstname,Account__r.Middle_Name__c ,'+
                   'Account__r.Speciality__c ,Account__r.Qualification1__c,Address__r.State__r.Name, Address__r.City__r.Name,Address__r.Area_Locality_Taluka__r.Name,'+
                   'Address__r.Address_Line1__c,Address__r.Address_Line2__c From Address_junction__c '+
                   'WHERE  Account__r.RecordType.Name=:selectedCustomerType  '+
                   ' AND Account__r.firstname LIKE: FName '+
                   ' AND Account__r.lastname LIKE: LName ';
                  
            if(selectedState!=Null)
               Acclist+=' AND Address__r.State__r.Name=:selectedState';
         
            if(selectedCity!=Null)
                    Acclist+=' AND Address__r.City__r.Name=:selectedCity' ;
             if(accnt.Middle_Name__c!=Null && accnt.Middle_Name__c!='')     
                     Acclist+=' AND Account__r.Middle_Name__c LIKE : MName';
             
               system.debug('--------------sobjects ----LName------'+Database.query(Acclist));
               addjunlistfinal = Database.query(Acclist);                         
               assignTBMDetails(addjunlistfinal);
             //  addjunlistfinal.clear();
                                                                         
                      
        
                  } // End FILTER_SEARCH && personAccount==true