• Amol Gujare
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies

Hi :

 

I would like to refresh full sandbox from production but we don;t want to refresh User object. I guess when we refresh full sandbox it will delete existing users from sandbox and create new user in sandbox as per production.

 

We had created couple of users in Full sandbox in addition to existing users from production enviornment.

 

is it possible? Any suggestions

 

Thanks

Amol Gujare

 

 

 

Hi :

 

We have 3 sandbox in our saleforce environment, Configuration , Full and Developer.

 

Example:

X is Configuration Only

Y is Full

Z is Developer only

 

I wanted to make Y Enviornment which is Full enviornment in to Developer Enviornment. I will create new Full Sandbox enviornment. I'm ready to remove data from Y Enviornment as per salesforce.com limit for Developer Sandbox. This all we trying to achive as we already have lots of important user in Y enviornment and i don;t want make any changes for that envionrment.

 

is it possible? Please suggest.

 

Example i would like to create like below Sandbox enviornment as per above

X is Configuration Only (Keep as it is)

Y is Developer only

Z is Developer only  (Keep as it is)

A is full (This would be new enviornment)

 

 

 

 

Hi All:

 

I am trying to assign multiple default values in String[] but its not working. Could you please help me out.

 

NOT WORKING BELOW CODE

==========================================================================

if (leadDivision.size()!=0) {
             for(Integer k =0; k < leadDivision.size() ;k++)
             {            
                 userDivisionName=userDivisionName+'\''+leadDivision[k].Division__r.Name+'\'';
                 if(k<leadDivision.size()-1)
                 userDivisionName=userDivisionName+', ';
             }
             division=new String[]{userDivisionName};
  }

 

 WORKING BELOW CODE

==========================================================================

division=new String[] {'Corporate Office','Laboratory Equipment','Scientific Instruments'};

 

i tried a lot for all string manupulations but its not showing me as selected for not working code.

 

Hi :

 

Is there any way i can display preselected division names in list on the basis of user profile. All user can see all divison names but i want to mark as selected in the multiselectlist for couple of division names. Like in normal java code we use "Selected"

 

 Anyone knows what code i should use to mark those divison as pre selected.

 

Controller Class:

 

    //Method to get the division options from the Division_Information__c custom Object.
    public List<SelectOption> getDivisions()
    {  
        divisionIds='';
        divisionName='';
        List<SelectOption> options = new List<SelectOption>();
        String divQry;
        String divQryAdl;
        List<Division_Information__c> divisioninfo;
        List<User_Division__c> leadDivision;

                System.debug('isDivisionActive>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+isDivisionActive);
                divQry='Select u.User__c,u.Id, u.Division__r.Name,u.Division__r.Id  From User_Division__c u where user__c= \''+UserInfo.getUserId()+'\'';
            if(isDivisionActive){
            divQry+= ' and u.Division__r.is_Live__c=true'; 
            }
            String divAdlQry=' order by u.Division__r.Name';
            String divFinalQry=divQry+divAdlQry;
            System.debug('divFinalQry>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+divFinalQry);
            //List<Division_Information__c> leadDivision =[Select  g.Name  From Division_Information__c g order by g.Name asc];
            leadDivision =Database.query(divFinalQry);
            for( User_Division__c f : leadDivision)
            {
                options.add(new SelectOption(f.Division__r.Name, f.Division__r.Name));
                divisionList.add(f.Division__r.Id);
            }
       
            System.debug('leadDivision.size()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+leadDivision.size());
            for(Integer i =0; i < leadDivision.size() ;i++)
            {            
                divisionName=divisionName+'\''+leadDivision[i].Division__r.Name+'\'';
                if(i<leadDivision.size()-1)
                divisionName=divisionName+',';
            }   
            for(Integer i =0; i < leadDivision.size() ;i++)
            {      
                divisionIds=divisionIds+'\''+leadDivision[i].Division__r.Id+'\'';
                if(i<leadDivision.size()-1)
                divisionIds=divisionIds+',';   
            }              
            if (leadDivision.size()==0){
                options.add(new SelectOption('No Division found', 'No Division found'));
                noDivisionFlg=true;
            }

      return options;
    }  

    public void setDivision(String[] division) { this.division = division; } 

    /* Getter for the division value */
    public String[] getDivision() {
        return division;
     }

 

 

Visualforce Page:

 

               <apex:pageblockSectionItem id="division">
                    <apex:panelGrid columns="1" id="theGrid2"> 
                        <apex:outputLabel value="Division" for="pc32" styleClass="heading"/>
                            <apex:pageblockSectionItem id="divisionInput">
                                <apex:selectList value="{!Division}"  id="LeadDivision" multiselect="true" size="5" disabled="{!NoDivisionFlg}">
                                    <apex:selectOptions value="{!Divisions}"/>                        
                                </apex:selectList>               
                            </apex:pageblockSectionItem>
                                  
                    </apex:panelGrid>                     
                </apex:pageblockSectionItem>       

Hi :

 

I would like to refresh full sandbox from production but we don;t want to refresh User object. I guess when we refresh full sandbox it will delete existing users from sandbox and create new user in sandbox as per production.

 

We had created couple of users in Full sandbox in addition to existing users from production enviornment.

 

is it possible? Any suggestions

 

Thanks

Amol Gujare

 

 

 

Hi :

 

We have 3 sandbox in our saleforce environment, Configuration , Full and Developer.

 

Example:

X is Configuration Only

Y is Full

Z is Developer only

 

I wanted to make Y Enviornment which is Full enviornment in to Developer Enviornment. I will create new Full Sandbox enviornment. I'm ready to remove data from Y Enviornment as per salesforce.com limit for Developer Sandbox. This all we trying to achive as we already have lots of important user in Y enviornment and i don;t want make any changes for that envionrment.

 

is it possible? Please suggest.

 

Example i would like to create like below Sandbox enviornment as per above

X is Configuration Only (Keep as it is)

Y is Developer only

Z is Developer only  (Keep as it is)

A is full (This would be new enviornment)

 

 

 

 

Hi All:

 

I am trying to assign multiple default values in String[] but its not working. Could you please help me out.

 

NOT WORKING BELOW CODE

==========================================================================

if (leadDivision.size()!=0) {
             for(Integer k =0; k < leadDivision.size() ;k++)
             {            
                 userDivisionName=userDivisionName+'\''+leadDivision[k].Division__r.Name+'\'';
                 if(k<leadDivision.size()-1)
                 userDivisionName=userDivisionName+', ';
             }
             division=new String[]{userDivisionName};
  }

 

 WORKING BELOW CODE

==========================================================================

division=new String[] {'Corporate Office','Laboratory Equipment','Scientific Instruments'};

 

i tried a lot for all string manupulations but its not showing me as selected for not working code.

 

Hi :

 

Is there any way i can display preselected division names in list on the basis of user profile. All user can see all divison names but i want to mark as selected in the multiselectlist for couple of division names. Like in normal java code we use "Selected"

 

 Anyone knows what code i should use to mark those divison as pre selected.

 

Controller Class:

 

    //Method to get the division options from the Division_Information__c custom Object.
    public List<SelectOption> getDivisions()
    {  
        divisionIds='';
        divisionName='';
        List<SelectOption> options = new List<SelectOption>();
        String divQry;
        String divQryAdl;
        List<Division_Information__c> divisioninfo;
        List<User_Division__c> leadDivision;

                System.debug('isDivisionActive>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+isDivisionActive);
                divQry='Select u.User__c,u.Id, u.Division__r.Name,u.Division__r.Id  From User_Division__c u where user__c= \''+UserInfo.getUserId()+'\'';
            if(isDivisionActive){
            divQry+= ' and u.Division__r.is_Live__c=true'; 
            }
            String divAdlQry=' order by u.Division__r.Name';
            String divFinalQry=divQry+divAdlQry;
            System.debug('divFinalQry>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+divFinalQry);
            //List<Division_Information__c> leadDivision =[Select  g.Name  From Division_Information__c g order by g.Name asc];
            leadDivision =Database.query(divFinalQry);
            for( User_Division__c f : leadDivision)
            {
                options.add(new SelectOption(f.Division__r.Name, f.Division__r.Name));
                divisionList.add(f.Division__r.Id);
            }
       
            System.debug('leadDivision.size()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'+leadDivision.size());
            for(Integer i =0; i < leadDivision.size() ;i++)
            {            
                divisionName=divisionName+'\''+leadDivision[i].Division__r.Name+'\'';
                if(i<leadDivision.size()-1)
                divisionName=divisionName+',';
            }   
            for(Integer i =0; i < leadDivision.size() ;i++)
            {      
                divisionIds=divisionIds+'\''+leadDivision[i].Division__r.Id+'\'';
                if(i<leadDivision.size()-1)
                divisionIds=divisionIds+',';   
            }              
            if (leadDivision.size()==0){
                options.add(new SelectOption('No Division found', 'No Division found'));
                noDivisionFlg=true;
            }

      return options;
    }  

    public void setDivision(String[] division) { this.division = division; } 

    /* Getter for the division value */
    public String[] getDivision() {
        return division;
     }

 

 

Visualforce Page:

 

               <apex:pageblockSectionItem id="division">
                    <apex:panelGrid columns="1" id="theGrid2"> 
                        <apex:outputLabel value="Division" for="pc32" styleClass="heading"/>
                            <apex:pageblockSectionItem id="divisionInput">
                                <apex:selectList value="{!Division}"  id="LeadDivision" multiselect="true" size="5" disabled="{!NoDivisionFlg}">
                                    <apex:selectOptions value="{!Divisions}"/>                        
                                </apex:selectList>               
                            </apex:pageblockSectionItem>
                                  
                    </apex:panelGrid>                     
                </apex:pageblockSectionItem>