• justyn
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 52
    Replies

Hi

 

I have a search controller that I use for 'finding a counsellor' in our database. It works in terms of presenting the correct results based on the criteria given. I want to make the search function publicly available but want the results of the search to be randomised somehow so that the name contact isn't always at the top of the page. Does my enquiry make sense and is there anything that I can do to achieve this?

 

As I say the search filters work nicely, but I want to be fair to those in our database so that they all have a chance of being at the top of the search results table.

 

Thanks in advance

 

Justyn

  • November 10, 2011
  • Like
  • 0

I have a search page for my custom object and in the result display the Member field (linked to Contact) is automatically clickable. I don't want this to be the case. Can I disable this?

 

The code for the section is:

 

<apex:column >               

<apex:facet name="header">                   

<apex:commandLink value="Member" action="{!toggleSort}" rerender="results,debug">                       

<apex:param name="sortField" value="member" assignTo="{!sortField}"/>                   

</apex:commandLink>               

</apex:facet>               

<apex:outputField value="{!counselling_practice.Member__c}"/>           

</apex:column>

 

Thanks in advance

 

Justyn

  • November 02, 2011
  • Like
  • 0

Hi

 

I've got a working search page in visualforce using apex controllers. It works fine in Salesforce user environmen, but I now want to make it visible on our website for others to us. 

 

I've got the page displayed in Sites and can see the page and interact ok with teh search filter boxes. My only issue is that the data is not displaying! I have amended the Public Profile so that the Apex code is enabled and the relevant Custom object is enabled for read only access. The data does not display however. It is linked to the Contacts object which has read access enabled as well.

 

Would it help to see the controller code?

 

I hope someone can help.

 

REgards

 

Justyn

  • November 02, 2011
  • Like
  • 0

I have a custom object search page work based on the excellent template by Jeff Douglas at http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/

 

The page works fine when logged into the system, but I require it to be publicly viewable. I've added it to my Sites and can view everything apart from the data! Any thoughts? I have made the relevant Custom Object as Read in the Guest Profile.

 

Thanks in advance

 

Justyn

  • October 26, 2011
  • Like
  • 0

Hi

 

I have a working search page on my system. It works great, but we often want to click on a number of entries to view data, and not have to click back and then click on another item. We can of course right click and open in a new tab, but not all my users are that technical. I want to edit the following code so that when you click on the field on the page it will open in a new tab.

 

<apex:column >               

<apex:facet name="header">                   

<apex:commandLink value="Name" action="{!toggleSort}" rerender="results,debug">                       

<apex:param name="sortField" value="name" assignTo="{!sortField}"/>                   

</apex:commandLink>               

</apex:facet>               

<apex:outputlink value="/{!counselling_practice.id}">                   

<apex:outputField value="{!counselling_practice.name}"/>               

</apex:outputlink>           

</apex:column>

 

Any thoughts?

 

Thanks

 

Justyn

  • September 12, 2011
  • Like
  • 0

Hi 

 

I've recently installed the Time Off Manager. I have the occassional look to see how it has developed and found that it was the first time that I could install and make it work following the Admin guide - Well Done!

 

I'm now looking at what I guess are limitations from my point of view. There are more in terms of how my organisation works and what I'd want to be able to do. They are:

 

1. Allow for part days or even hours off, not just full days off.

2. Record Overtime and Time Off In Lieu. We don't pay overtime, but do allow for Time Off In Lieu (TOIL). To be able to allow a staff member to submit for approval overtime work, and then to submit for approval the time they want to take off as TOIL would be fantastic. 

3. Sick Days - Not an essential item, but a good one to have recorded, is for a member of staff who has been off sick, to have to confirm and record their sick days. Each employee in our org has an allowed 9 days per annum of sick days, after which the become unpaid sick days.

 

I can see how I could work around the system for the separate types of leave by creating three users for every employee and add a note in their 'name' to reflect the leave type. This would not be ideal, but could work. However it would not resolve my problems of part days, or hours off, or recording overtime and therefore accrued TOIL.

 

Has anyone found a working solution or is this something that could be working in to the future versions of this application?

 

Many thanks

 

Justyn

 

 

  • August 08, 2011
  • Like
  • 0

we are a membership based organisation and Iwould like renewal reminder emails to be automatically sent to members 60 days before their renewal becomes due. Every member will have a different renewal date. 

 

I haven't found a way to do it yet, and it would transform how we work if it were possible.

 

Thanks

 

Justyn

I want to be able to create a workflow so that when one of our contacts is marked as inactive, a field in a related custom object is updated to an inactive status as well. I can create all the workflow apart from the field update as it will not allow me access to that objects field. There is a Master-Detail relationship.

 

Is there a way this can be done?

 

Thanks.

 

Justyn

Hi

 

I've been able to tweek some code from a blog so that I have a fully functioning visualforce page search function in my  sandbox. I now want to deploy to the production environment, but it will not allow it as 'Average test coverage across all Apex Classes and Triggers is 70%, at least 75% test coverage is required.'

 

Not being a programmer (ie I can tweek but don't have a 'write it from scratch' background) this is now frustrating as the apex code and page work so nicely and will solve a major gripe in my organisation. 

 

Is anyone able to help? I have pasted the code below for ease. I am willing to learn, but recognise that there is a lot ot learn.

 

Justyn

 

 

public with sharing class ReferralSearchController {
 
  // the soql without the order and limit
  private String soql {get;set;}
  // the collection of contacts to display
  public List<Counselling_Practice__c> counselling_practices {get;set;}
 
  // the current sort direction. defaults to asc
  public String sortDir {
    get  { if (sortDir == null) {  sortDir = 'asc'; } return sortDir;  }
    set;
  }
 
  // the current field to sort by. defaults to last name
  public String sortField {
    get  { if (sortField == null) {sortField = 'name'; } return sortField;  }
    set;
  }
 
  // format the soql for display on the visualforce page
  public String debugSoql {
    get { return soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20'; }
    set;
  }
 
  // init the controller and display some sample data when the page loads
  public ReferralSearchController() {
    soql = 'select name, ID, member__c, Counselling_Service__c, Therapeutic_Approach__c, fee_amount__c, Referral_County__c, Practice_Area_Town__c, Practice_City_County__c, for_whom__c, gender__c, donations__c, negotiable__c, free_service__c from counselling_practice__c where name != null and currently_active__c = True';
    runQuery();
  }
 
  // toggles the sorting of query from asc<-->desc
  public void toggleSort() {
    // simply toggle the direction
    sortDir = sortDir.equals('asc') ? 'desc' : 'asc';
    // run the query again
    runQuery();
  }
 
  // runs the actual query
  public void runQuery() {
 
    try {
      counselling_practices = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20');
    } catch (Exception e) {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Ooops!'));
    }
 
  }
 
  // runs the search with parameters passed via Javascript
  public PageReference runSearch() {
 
    String name = Apexpages.currentPage().getParameters().get('name');
    String ID = ApexPages.currentPage().getParameters().get('id');
    String member = Apexpages.currentPage().getParameters().get('member');
    String Counselling_Service = Apexpages.currentPage().getParameters().get('Counselling_Service');
    String Therapeutic_Approach = Apexpages.currentPage().getParameters().get('Therapeutic_Approach');
    String fee_amount = Apexpages.currentPage().getParameters().get('fee_amount');
    String Referral_County = Apexpages.currentPage().getParameters().get('Referral_County');
    String Practice_Area_Town = Apexpages.currentPage().getParameters().get('Practice_Area_Town');
    String Practice_City_County = Apexpages.currentPage().getParameters().get('Practice_City_County');
    String for_whom = Apexpages.currentPage().getParameters().get('for_whom');
    String gender = Apexpages.currentPage().getParameters().get('gender');
    String donations = Apexpages.currentPage().getParameters().get('donations');
    String negotiable = Apexpages.currentPage().getParameters().get('negotiable');
    String free_service = Apexpages.currentPage().getParameters().get('free_service');
 
    soql = 'select name, ID, member__c, Counselling_Service__c, Therapeutic_Approach__c, fee_amount__c, Referral_County__c, Practice_Area_Town__c, Practice_City_County__c, for_whom__c, gender__c, donations__c, negotiable__c, free_service__c from counselling_practice__c where name != null and currently_active__c = True';
    if (!name.equals(''))
      soql += ' and name LIKE \''+String.escapeSingleQuotes(name)+'%\'';
    if (!member.equals(''))
      soql += ' and member__c LIKE \''+String.escapeSingleQuotes(member)+'%\'';
     if (!Counselling_Service.equals(''))
      soql += ' and Counselling_Service__c includes (\''+Counselling_Service+'\')';
      if (!Therapeutic_Approach.equals(''))
      soql += ' and Therapeutic_Approach__c includes (\''+Therapeutic_Approach+'\')';
    if (!fee_amount.equals(''))
      soql += ' and fee_amount__c LIKE \''+String.escapeSingleQuotes(fee_amount)+'%\'';  
    if (!Referral_County.equals(''))
      soql += ' and Referral_County__c = \''+Referral_County+'\'';
    if (!Practice_Area_Town.equals(''))
      soql += ' and Practice_Area_Town__c LIKE \''+String.escapeSingleQuotes(Practice_Area_Town)+'%\'';
      if (!Practice_City_County.equals(''))
      soql += ' and Practice_City_County__c LIKE \''+String.escapeSingleQuotes(Practice_City_County)+'%\'';
    if (!for_whom.equals(''))
      soql += ' and for_whom__c includes (\''+for_whom+'\')';
    if (!gender.equals(''))
      soql += ' and gender__c LIKE \''+String.escapeSingleQuotes(gender)+'%\'';
      if (!donations.equals(''))
      soql += ' and donations__c LIKE \''+String.escapeSingleQuotes(donations)+'%\'';
    if (!negotiable.equals(''))
      soql += ' and negotiable__c LIKE \''+String.escapeSingleQuotes(negotiable)+'%\'';  
    if (!free_service.equals(''))
      soql += ' and free_service__c LIKE \''+String.escapeSingleQuotes(free_service)+'%\'';  
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Counselling_Service{
    get {
      if (Counselling_Service== null) {
 
        Counselling_Service = new List<String>();
        Schema.DescribeFieldResult field = counselling_practice__c.Counselling_Service__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Counselling_Service.add(f.getLabel());
 
      }
      return Counselling_Service;          
    }
    set;
  }
  
  public List<String> Therapeutic_Approach{
    get {
      if (Therapeutic_Approach== null) {
 
        Therapeutic_Approach = new List<String>();
        Schema.DescribeFieldResult field = counselling_practice__c.Therapeutic_Approach__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Therapeutic_Approach.add(f.getLabel());
 
      }
      return Therapeutic_Approach;          
    }
    set;
  }
  
  public List<String> Referral_County{
    get {
      if (Referral_County== null) {
 
        Referral_County = new List<String>();
        Schema.DescribeFieldResult field = counselling_practice__c.Referral_County__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          Referral_County.add(f.getLabel());
 
      }
      return Referral_County;          
    }
    set;
  }
  public List<String> for_whom{
    get {
      if (for_whom== null) {
 
        for_whom = new List<String>();
        Schema.DescribeFieldResult field = counselling_practice__c.for_whom__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
          for_whom.add(f.getLabel());
 
      }
      return for_whom;          
    }
    set;
  }
 
}

 

Hi

 

I have utilised the excellent demo from Jeff Douglas at http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/ for building a custom dynamic search page in visual force. There is a great demo app there.

 

I have amended the code so that it works from my custom object. The page works fine, but I have an extra function that I would like but am not sure how to develop. 

 

In the search results on my VF page I want to be able to click on the name of each custom objects record so that it opens the record in the normal layout for the custom object. The custom object has a master detail relationship to Contacts and the field for this relationship has the link automatically displayed. Can anyone enlighten me as to the peice of code I need to allow the Name field to be clickable?

 

The code I have in the VF page for this field is:

 

 

<apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!counselling_practice.name}"/>
            </apex:column>

 

 

Many thanks in advance

 

Justyn

 

Hi

 

We have a custom object built for our membership applications system. The applications for different levels of membership Accredited or Supervisor. When approved the membership lasts for 5 years from the date of approval. We have a system that already calculates the date of the new renewal for each membership type using the roll up summary fields.

 

However there is now a new set of membership applications that need to be integrated, and they relate to the existing two types of application (eg Inactive Accredited applications and Inactive Supervisor applications). A member can apply for inactive membership for a couple of years. If granted this then extends the renewal date by a couple of years. Creating the record type is not a problem, but I haven't got anywhere with a suitable formula for calculating the latest renewal date for a membership type based on the latest application and the relevant Inactive applications. 

 

If anyone has any thoughts it would be a great help. I appreciate that there may be some more questions needing to be asked based upon the above.

 

Many thanks in advance

 

Justyn

I've just been playing with the Map Nearby Accounts in the sandbox and love it. It would be perfect for my situation if I could also include custom objects (I only require one extra object to be mapped). Has anyone done this and got a useful step by step guide? We are a not for profit org, and would love this function.

 

I'd also like to be able to add some extra fields to those that get displayed on the map.

 

Justyn

  • August 10, 2010
  • Like
  • 0

Is there a way to link the employees in each app to the users in my system. It seems pointless having to enter the users in both systems as well as as just normal users - isn't that why we have systems to avoid duplication?

 

Any guidance that can be given would be great.

 

Justyn 

  • January 21, 2010
  • Like
  • 0

Hi

 

When I click on the team calendar tab the screen seems to refresh but no calendar is displayed. I am not getting any error message displayed either? Has anyone encountered anything similar?

 

Justyn 

  • December 14, 2009
  • Like
  • 0

Hi

 

I've installed Time Off Manager in my not for profit edition (it took a while as the install does not seem to be straightforward....).

 

All looks ok apart from when I try to save a time off request. I get the following error message:

 

Error: Invalid Data. 
Review all error messages below to correct your data.

You cannot create Time Off Requests because your Employee Number is not configured. 

 

Does any one have any helpful thoughts on how to correct this?

 

Thanks

 

Justyn 

  • December 11, 2009
  • Like
  • 0

Hi

 

I have a search controller that I use for 'finding a counsellor' in our database. It works in terms of presenting the correct results based on the criteria given. I want to make the search function publicly available but want the results of the search to be randomised somehow so that the name contact isn't always at the top of the page. Does my enquiry make sense and is there anything that I can do to achieve this?

 

As I say the search filters work nicely, but I want to be fair to those in our database so that they all have a chance of being at the top of the search results table.

 

Thanks in advance

 

Justyn

  • November 10, 2011
  • Like
  • 0

I have a search page for my custom object and in the result display the Member field (linked to Contact) is automatically clickable. I don't want this to be the case. Can I disable this?

 

The code for the section is:

 

<apex:column >               

<apex:facet name="header">                   

<apex:commandLink value="Member" action="{!toggleSort}" rerender="results,debug">                       

<apex:param name="sortField" value="member" assignTo="{!sortField}"/>                   

</apex:commandLink>               

</apex:facet>               

<apex:outputField value="{!counselling_practice.Member__c}"/>           

</apex:column>

 

Thanks in advance

 

Justyn

  • November 02, 2011
  • Like
  • 0

Hi

 

I've got a working search page in visualforce using apex controllers. It works fine in Salesforce user environmen, but I now want to make it visible on our website for others to us. 

 

I've got the page displayed in Sites and can see the page and interact ok with teh search filter boxes. My only issue is that the data is not displaying! I have amended the Public Profile so that the Apex code is enabled and the relevant Custom object is enabled for read only access. The data does not display however. It is linked to the Contacts object which has read access enabled as well.

 

Would it help to see the controller code?

 

I hope someone can help.

 

REgards

 

Justyn

  • November 02, 2011
  • Like
  • 0

I have a custom object search page work based on the excellent template by Jeff Douglas at http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/

 

The page works fine when logged into the system, but I require it to be publicly viewable. I've added it to my Sites and can view everything apart from the data! Any thoughts? I have made the relevant Custom Object as Read in the Guest Profile.

 

Thanks in advance

 

Justyn

  • October 26, 2011
  • Like
  • 0

Hi

 

I have a working search page on my system. It works great, but we often want to click on a number of entries to view data, and not have to click back and then click on another item. We can of course right click and open in a new tab, but not all my users are that technical. I want to edit the following code so that when you click on the field on the page it will open in a new tab.

 

<apex:column >               

<apex:facet name="header">                   

<apex:commandLink value="Name" action="{!toggleSort}" rerender="results,debug">                       

<apex:param name="sortField" value="name" assignTo="{!sortField}"/>                   

</apex:commandLink>               

</apex:facet>               

<apex:outputlink value="/{!counselling_practice.id}">                   

<apex:outputField value="{!counselling_practice.name}"/>               

</apex:outputlink>           

</apex:column>

 

Any thoughts?

 

Thanks

 

Justyn

  • September 12, 2011
  • Like
  • 0

Hi 

 

I've recently installed the Time Off Manager. I have the occassional look to see how it has developed and found that it was the first time that I could install and make it work following the Admin guide - Well Done!

 

I'm now looking at what I guess are limitations from my point of view. There are more in terms of how my organisation works and what I'd want to be able to do. They are:

 

1. Allow for part days or even hours off, not just full days off.

2. Record Overtime and Time Off In Lieu. We don't pay overtime, but do allow for Time Off In Lieu (TOIL). To be able to allow a staff member to submit for approval overtime work, and then to submit for approval the time they want to take off as TOIL would be fantastic. 

3. Sick Days - Not an essential item, but a good one to have recorded, is for a member of staff who has been off sick, to have to confirm and record their sick days. Each employee in our org has an allowed 9 days per annum of sick days, after which the become unpaid sick days.

 

I can see how I could work around the system for the separate types of leave by creating three users for every employee and add a note in their 'name' to reflect the leave type. This would not be ideal, but could work. However it would not resolve my problems of part days, or hours off, or recording overtime and therefore accrued TOIL.

 

Has anyone found a working solution or is this something that could be working in to the future versions of this application?

 

Many thanks

 

Justyn

 

 

  • August 08, 2011
  • Like
  • 0

Hi

 

I have utilised the excellent demo from Jeff Douglas at http://blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/ for building a custom dynamic search page in visual force. There is a great demo app there.

 

I have amended the code so that it works from my custom object. The page works fine, but I have an extra function that I would like but am not sure how to develop. 

 

In the search results on my VF page I want to be able to click on the name of each custom objects record so that it opens the record in the normal layout for the custom object. The custom object has a master detail relationship to Contacts and the field for this relationship has the link automatically displayed. Can anyone enlighten me as to the peice of code I need to allow the Name field to be clickable?

 

The code I have in the VF page for this field is:

 

 

<apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="name" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!counselling_practice.name}"/>
            </apex:column>

 

 

Many thanks in advance

 

Justyn