• sfdcttsl
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Close date should be feature date but should not be in current month of current year

Hi,

 

My controller class is having two actions. One is search based on a picklist value. Other one is command button action based on the result of first action.

 

Command button action(second action) is not getting invoked when the first action is occured.

 

Indepently it is working fine. Only the command button action without the first action is working.

 

But these two should be dependent actions.

 

Please advise on the requorement.

Hi,

 

My requirement is to give a dropdown to the user and based on the selected value, a table has to be displayed.

 

If the dropdown value is changed, then the result set also should get changed.

 

The problem is whenever the drop down value is selected for the firsttime, the corresponding result set is shown. But whenever the dropdown value is changed for the second time, corresponding result set is not getting refreshed.

 

 

VFPAGE:

 

<apex:page StandardController="User" Extensions="UserData" tabstyle="User" sidebar="false">
  <apex:form >
  <apex:pageBlock title="Select Users" id="USERSLIST" mode="edit">
    <h1>Update Sales Co-ordinator for the users in Particular Region</h1>
  <br></br>
  <br></br>
      
   <apex:outputLabel value="Select Region of the user: " for="viewlist" />
<apex:inputField id="startMode" value="{!User.Region__c}">
<apex:actionsupport event="onchange" action="{!doSearch}" rerender="theTable" />
</apex:inputfield>
  
           <br></br>
   <apex:pageBlockTable value="{!results}" var="t" id="theTable">
        <apex:column >
          <apex:inputCheckbox value="{!User.ManagerId}" id="checkedone">
          </apex:inputCheckbox>
        </apex:column>
        <apex:column value="{!t.Name}"/>
        <apex:column value="{!t.Email}"/>
        <apex:column value="{!t.Region__c}"/>
        <apex:column value="{!t.Manager__c}"/>     
  </apex:pageBlockTable>
 

      
    </apex:pageblock>   
  </apex:form>
  </apex:page>

 

CONTROLLER:

 

public class UserData {
List<Userwrapper> userList {get;set;}
PUBLIC String usr{get;set;}
List<User> results=new List<User>();
public User user;
public ApexPages.StandardController stdCtrl;
public UserData(ApexPages.StandardController controller)
   {
     stdCtrl=controller;

   }  
    
        
  public Pagereference doSearch()
     {
      //results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:User.Region__c];
      User u=(User)stdCtrl.getrecord();
      results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:u.Region__c];

      system.debug('USERSLISTFOR REGION$$$$'+results);
      return null;
     }
   
     
   public List<User> getResults()
    {
        return results;
    }
 
 }

 

Please check and suggest if there are any ideas.

 

Thanks,

Ranjita.

 

Can anybody help me in resolving the below issue.

 

I have written a visualforce page consisting of picklist.When I select a value in the picklist the value should be passed to a variable in controller class.I am not getting the selected value in the variable.

 

/////////My Visualforce page

 

 

<apex:page StandardController="User" id="thePage" Extensions="UserData"> 

<apex:form >

<apex:pageBlock title="SelectUsers" id="USERSLIST" mode="edit">

<h1>Update Sales Co-ordinator for the users in Particular Region</h1>

<br></br>

Select Region of the User: <apex:inputField id="startMode" value="{!User.Region__c}" />

<br></br>

<apex:commandButton value="Search" action="{!doSearch}" status="myStatus">

</apex:commandButton>

<br></br>

</apex:pageblock>

</apex:form> 

</apex:page>

 

 

 

//////My Controller

 

public class UserData {

 PUBLIC String usr{get;set;}

PUBLIC List<selectOption> usrs;

List<User> results=new List<User>();

List<Id> userlist=new List<Id>();

String Regionid;

String Region;

public UserData(ApexPages.StandardController controller)

{

}

public Pagereference doSearch()

{

//selected picklistvalue should be passed to the below query

results = [select Name from User Where id=:??????];

system.debug('USERSLISTFOR REGION$$$$'+results);

return null;

}

 

public List<User> getResults()

{

return results;

}

}

 

 

Can anyone please help me in resolving the issue.

 

Thanks...

 

 

 

Please provide a

 

Hi all,

 

Can anyone help me in solving the below scenario.

 

I have written an onclick javascript and called a method and passed one arguement into it.now i want to write a test method for the class which is declared as webservice.

 

/////JAVASCRIPT CODE////////

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

var myvar = sforce.apex.execute("Insert_SSO_TimeManagement","insertSSO_TimeManagement",{oppID:"{!Opportunity.Name}"});

 

/////APEX CLASS/////

WebService static String insertSSO_TimeManagement(String oppID){

--

}

 

Please help me in writting the test method for the above class.

Hi,

 

My controller class is having two actions. One is search based on a picklist value. Other one is command button action based on the result of first action.

 

Command button action(second action) is not getting invoked when the first action is occured.

 

Indepently it is working fine. Only the command button action without the first action is working.

 

But these two should be dependent actions.

 

Please advise on the requirement

 

VFCODE:

<apex:page StandardController="User" Extensions="UserData" tabstyle="User" sidebar="false">
  <apex:form >
  <apex:pageBlock title="Select Users" id="USERSLIST" mode="edit">
    <h1>Update Sales Co-ordinator for the users in Particular Region</h1>
  <br></br>
  <br></br>
<apex:actionRegion >
<apex:outputLabel value="Select Region of the user: " for="viewlist" />
<apex:inputField id="startMode" value="{!User.Region__c}">
<apex:actionsupport event="onchange" action="{!doSearch}" rerender="theTable" />
</apex:inputfield> 
</apex:actionRegion>
           <br></br> 
   <apex:pageBlockTable value="{!results}" var="t" id="theTable">
        <apex:column >
          <apex:inputCheckbox value="{!User.ManagerId}" id="checkedone">
          </apex:inputCheckbox>
        </apex:column>
        <apex:column value="{!t.Name}"/>
        <apex:column value="{!t.Email}"/>
        <apex:column value="{!t.Region__c}"/>
        <apex:column value="{!t.Manager__c}"/>      
  </apex:pageBlockTable>
<!--<apex:inputField value="{!User.ManagerId}" rendered="{!size}"/> -->
<apex:inputField value="{!User.ManagerId}" styleClass="StyleCSS"/>
<apex:actionRegion >
<apex:commandButton value="UpdateManager" Id="Update" action="{!getselected}" styleClass="StyleCSS"/>
</apex:actionRegion>
    </apex:pageblock>    
  </apex:form>
  </apex:page>

  CONTROLLER:

public class UserData {
List<Userwrapper> userList {get;set;} 
PUBLIC String usr{get;set;} 
List<User> results=new List<User>();
public User user;
public ApexPages.StandardController stdCtrl;
public UserData(ApexPages.StandardController controller) 
   { 
     stdCtrl=controller;

   }   
        
         
  public Pagereference doSearch() 
     {
      //results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:User.Region__c];
      User u=(User)stdCtrl.getrecord();
      results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:u.Region__c];
            system.debug('USERSLISTFOR REGION$$$$'+results);
      return null;
     }
  public List<Userwrapper> XXX()  
   {
     if(userList == null) {
      userList = new List<Userwrapper>();

     for(User u:results)
      {
        userList.add(new Userwrapper(u));
      }
      system.debug('****ADDEDUSERS****'+userlist);
       }
       return userList;

  }
     
   Public PageReference getSelected()
   { 
        User u1=(User)stdCtrl.getrecord();
        system.debug('ENTERED INTO SELECTED');
        List<User> selectedUsers = new List<User>(); 
        for(userwrapper usrwrapper : XXX()) 
        { 
          if(usrwrapper.selected== true) 
          { 
           selectedusers.add(usrwrapper.wuser); 
          }
        }
        system.debug('@@@SELECTEDUSERs@@@:'+selectedusers);  
        return null;
  }
   
  public boolean getsize()
  {
    Integer size=results.size();
     IF(size>0)
      return True;
     Else 
      return false;
    
  } 
  Public Pagereference UpdateManager()
   {
        return null;
   }
     
   public List<User> getResults() 
    {
        return results;
    }
 
 }

 Update manager button action is not working in the page.

 

Please advice.

 

Thanks,

Santhi.

Hi,

 

My controller class is having two actions. One is search based on a picklist value. Other one is command button action based on the result of first action.

 

Command button action(second action) is not getting invoked when the first action is occured.

 

Indepently it is working fine. Only the command button action without the first action is working.

 

But these two should be dependent actions.

 

Please advise on the requorement.

Hi,

 

My requirement is to give a dropdown to the user and based on the selected value, a table has to be displayed.

 

If the dropdown value is changed, then the result set also should get changed.

 

The problem is whenever the drop down value is selected for the firsttime, the corresponding result set is shown. But whenever the dropdown value is changed for the second time, corresponding result set is not getting refreshed.

 

 

VFPAGE:

 

<apex:page StandardController="User" Extensions="UserData" tabstyle="User" sidebar="false">
  <apex:form >
  <apex:pageBlock title="Select Users" id="USERSLIST" mode="edit">
    <h1>Update Sales Co-ordinator for the users in Particular Region</h1>
  <br></br>
  <br></br>
      
   <apex:outputLabel value="Select Region of the user: " for="viewlist" />
<apex:inputField id="startMode" value="{!User.Region__c}">
<apex:actionsupport event="onchange" action="{!doSearch}" rerender="theTable" />
</apex:inputfield>
  
           <br></br>
   <apex:pageBlockTable value="{!results}" var="t" id="theTable">
        <apex:column >
          <apex:inputCheckbox value="{!User.ManagerId}" id="checkedone">
          </apex:inputCheckbox>
        </apex:column>
        <apex:column value="{!t.Name}"/>
        <apex:column value="{!t.Email}"/>
        <apex:column value="{!t.Region__c}"/>
        <apex:column value="{!t.Manager__c}"/>     
  </apex:pageBlockTable>
 

      
    </apex:pageblock>   
  </apex:form>
  </apex:page>

 

CONTROLLER:

 

public class UserData {
List<Userwrapper> userList {get;set;}
PUBLIC String usr{get;set;}
List<User> results=new List<User>();
public User user;
public ApexPages.StandardController stdCtrl;
public UserData(ApexPages.StandardController controller)
   {
     stdCtrl=controller;

   }  
    
        
  public Pagereference doSearch()
     {
      //results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:User.Region__c];
      User u=(User)stdCtrl.getrecord();
      results = [select Name,Region__c,Email,LanguageLocaleKey,Manager__c from User Where Region__c =:u.Region__c];

      system.debug('USERSLISTFOR REGION$$$$'+results);
      return null;
     }
   
     
   public List<User> getResults()
    {
        return results;
    }
 
 }

 

Please check and suggest if there are any ideas.

 

Thanks,

Ranjita.

 

Close date should be feature date but should not be in current month of current year

Can anybody help me in resolving the below issue.

 

I have written a visualforce page consisting of picklist.When I select a value in the picklist the value should be passed to a variable in controller class.I am not getting the selected value in the variable.

 

/////////My Visualforce page

 

 

<apex:page StandardController="User" id="thePage" Extensions="UserData"> 

<apex:form >

<apex:pageBlock title="SelectUsers" id="USERSLIST" mode="edit">

<h1>Update Sales Co-ordinator for the users in Particular Region</h1>

<br></br>

Select Region of the User: <apex:inputField id="startMode" value="{!User.Region__c}" />

<br></br>

<apex:commandButton value="Search" action="{!doSearch}" status="myStatus">

</apex:commandButton>

<br></br>

</apex:pageblock>

</apex:form> 

</apex:page>

 

 

 

//////My Controller

 

public class UserData {

 PUBLIC String usr{get;set;}

PUBLIC List<selectOption> usrs;

List<User> results=new List<User>();

List<Id> userlist=new List<Id>();

String Regionid;

String Region;

public UserData(ApexPages.StandardController controller)

{

}

public Pagereference doSearch()

{

//selected picklistvalue should be passed to the below query

results = [select Name from User Where id=:??????];

system.debug('USERSLISTFOR REGION$$$$'+results);

return null;

}

 

public List<User> getResults()

{

return results;

}

}

 

 

Can anyone please help me in resolving the issue.

 

Thanks...

 

 

 

Please provide a

 

Hello,

 

                I'm looking for a little help with a validation rule. So far i have the following rule.

 

ISPICKVAL( Resolution_Type__c ,"Trouble")
&&
NOT(ISPICKVAL(Status ,"Working")
)

 

Which when Trouble is chosen from picklist then the case status has to be set to working in order to save. This is working great.

 

Now i'm looking to make this rule apply only for three individual users. I know i can use $User.Id <> "###" to specify some users but i'm just not sure on the syntax to make it work with the rest of the rule and make the rule only trigger for these specific users.  Any help would be greatly appreciated.  Thanks Mike

  • September 20, 2012
  • Like
  • 0

I built a workflow the sends an email alert to the lead owner when the status is Open and the Last Modified is greater then 2 days. In the workflow I have an email alert that goes to the lead owner.  I want an email to also go to the lead owners manager.

 

How would I do this?

  • September 11, 2012
  • Like
  • 0

Hi all,

 

Can anyone help me in solving the below scenario.

 

I have written an onclick javascript and called a method and passed one arguement into it.now i want to write a test method for the class which is declared as webservice.

 

/////JAVASCRIPT CODE////////

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

var myvar = sforce.apex.execute("Insert_SSO_TimeManagement","insertSSO_TimeManagement",{oppID:"{!Opportunity.Name}"});

 

/////APEX CLASS/////

WebService static String insertSSO_TimeManagement(String oppID){

--

}

 

Please help me in writting the test method for the above class.

Would like to create a button on the case object that will create a person account off the standard fields of the case. I would also like to check and make sure that the person account does not exist first before allowing to create.

  • April 02, 2012
  • Like
  • 0