• Jezza83
  • NEWBIE
  • 25 Points
  • Member since 2008
  • Technical Architect
  • PRM Cloud Solutions


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 16
    Replies

Hi would really appreciate anyone's help with this one as I have gone over it a hundred times and am really stuck.

 

I can't work out why but Salesforce isn't letting me set the current page in my test method - I have done this a hundred times before and it is still in all the examples Salesforce give in their documentation but I am consistently getting a compile error: Method does not exist or incorrect signature: Test.setCurrentPage(System.PageReference)

 

 

 

@isTest

private class QuoteWizardControllerTest 
{

    public static testMethod void QuoteWizardController() 
    {
    	// Set the pageRef to Quote 1
    	PageReference pageRef = Page.quote1;
    	
    	//Instantiate and construct the controller class.   
        QuoteWizardController controller = new QuoteWizardController();

        // Set the current page
        Test.setCurrentPage(pageRef);
 
     }
}

 

I am using API v19 however I have tried going back a few versions but still no joy.

 

Any help would be greatly appreciated with this one.

 

Cheers Jeremy

 

 

 

I have created a web2contact form using Sites however whenever you submit on the form you are presented with an "Authorization Required" error message.

 

Has anyone else come across this before ? 

 

I have checked everything including the Guest User Profile permissions, field level security on Contacts object etc. but all looks fine.

 

Really appreciate any help with this one !

I am trying to prevent all Users (bar Admin Profile) from creating Accounts except for record type x.

 

I have created a basic trigger below but am receving the error line 5: Comparison arguments must be compatible types: Schema.SObjectField, String - however I thought the below was represented as a string (in single quotes) ?

 

trigger NonAlignedPractice on Account (before insert) { for (Account TempAccount: System.Trigger.old) { if (Account.RecordTypeId != '01230000000LDuaAAG' && User.ProfileId != '00e300000018UCHAA2') TempAccount.addError('You can only create a Non-Aligned Practice.'); } }

 

Thanks for any help

I am trying to get the Salesforce Calendar Link to display on my VF page next to my field but am having no joy...

 

 

// Get Commencement Date for Add and Change Operations

public Date getCommencementDate() {

return null;

}

// Set Commencement Date for Add and Change Operations

public void setCommencementDate(Date CommencementDate) {

this.CommencementDate = CommencementDate;

}

 

---------------------------------------------

 

<apex:inputText value="{!CommencementDate}" />

 

 Salesforce won't allow me to display the input field as type inputField as it is not an SObject field. I have some javascript that displays a popup calendar but I would really like to use the native functionality if possible to retain the look and feel of the UI for users (as the javascript calendar actually pops up in a separate window).

 

Any help would be greatly appreciated.... 

 

Message Edited by JDog on 03-02-2010 11:57 PM
Quick query - I have 80% code coverage on my apex class yet my overall coverage is 70% as it is including my test method....do I need unit tests for my test methods ?

I have created test methods for my APEX code however I am unsure how to test the following which is still highlighted as uncovered.

Any help with how to go about this would be greatly appreciated !

public string fromUserID { get; set; } public string fromUserID1 { get; set; } public List<SelectOption> getfromUsers() { integer queryLimit = 5000; List<SelectOption> options = new List<SelectOption>(); options.add(new selectOption('', '--- select ---')); for (User u : [Select ID, Name FROM User Order by Name LIMIT :queryLimit]) { options.add(new selectOption(u.ID, u.Name)); } return options; } // Apply Search Criteria Values by User Input to SOQL Query public void search() { String queryFromUserID = FromUserID; String queryFromUserID1 = FromUserID1; // Run SOQL Query based on User Input if (FromUserID != null && FromUserID1 == null) { result = [ SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Relationship_Manager_State__c, Account_Name__c, Account_State__c, Account_Number__c, Relationship_Manager_Name__c, Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID, OwnerID FROM Panel_Relationship__c WHERE Relationship_Manager_ID__c like :queryFromUserID ORDER by Account_Name__c ]; } else if (FromUserID == null && FromUserID1 != null) { result = [ SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Relationship_Manager_State__c, Account_Name__c, Account_State__c, Account_Number__c, Relationship_Manager_Name__c, Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID, OwnerID FROM Panel_Relationship__c WHERE Account_Type__c like :queryfromUserID1 ORDER by Account_Name__c ]; }

 

 

 

I am relatively new to APEX and Visualforce and I am developing a VF page so users can search for records of a custom object and modify records either individually or en masse. I have created the VF page and Controller Extension and everything is working correctly except one part; I am trying to allow users to select multiple values to search a single field but I am receiving an error;

Error:

Conversion Error setting value 'NSW VIC' for '#{RelationshipManagerState}'

 

Any help with this problem would be greatly appreciated.

 

The section of the Controller Extension dealing with the dynamic SOQL is below with the sections I believe are giving me trouble highlighted in red;

 

 

/* Get Search Criteria Values */

public String getRelationshipRoleType() {
return null;
}

public String getRelationshipManagerID() {
return null;
}

public String getRelationshipManagerState() {
return null;
}


public String getAccountType() {
return null;
}

public String getAccountState() {
return null;
}

public String getLicenseeName() {
return null;
}

public String getServiceType() {
return null;
}

/* Set Results List */

public List<Panel_Relationship__c> result = new List<Panel_Relationship__c>();
private String RelationshipRoleType;
private String RelationshipManagerID;
private String RelationshipManagerState;
private String AccountType;
private String AccountState;
private String LicenseeName;
private String ServiceType;
public PanelMaintanenceExtension(){
}

public List<Panel_Relationship__c> getResult() {
return result;
}

/* Set Search Criteria Values */

public void setRelationshipRoleType(String RelationshipRoleType) {
this.RelationshipRoleType = RelationshipRoleType;
}

public void setRelationshipManagerID(String RelationshipManagerID) {
this.RelationshipManagerID = RelationshipManagerID;
}


public void setRelationshipManagerState(String RelationshipManagerState) {
this.RelationshipManagerState = RelationshipManagerState;
}

public void setAccountType(String AccountType) {
this.AccountType = AccountType;
}

public void setAccountState(String AccountState) {
this.AccountState = AccountState;
}

public void setLicenseeName(String LicenseeName) {
this.LicenseeName = LicenseeName;
}

public void setServiceType(String ServiceType) {
this.ServiceType = ServiceType;
}

/* Apply Search Criteria Values to Query and Run Query */

public void search() {
String queryRelationshipRoleType = RelationshipRoleType + '%';
String queryRelationshipManagerID = RelationshipManagerID + '%' ;
String queryRelationshipManagerState = RelationshipManagerState + '%';
String queryAccountType = AccountType;
String queryAccountState = AccountState = '%';
String queryLicenseeName = LicenseeName + '%';
String queryServiceType = ServiceType = '%';
result = [
SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Manager_State__c,
Relationship_Manager_Name__c, Account_ID__c, Account_Name__c, Account_State__c,
Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID
FROM Panel_Relationship__c
WHERE Role_Type__c like :queryRelationshipRoleType
AND Relationship_Manager_ID__c like :queryRelationshipManagerID
AND Relationship_Manager_State__c like :queryRelationshipManagerState
AND Account_Type__c = :queryAccountType
AND Account_State__c like :queryAccountState
AND Licensee_Name__c like :queryLicenseeName
AND Service_Type__c like :queryServiceType ];

}

 

and the Visualforce Page is;

 

<apex:page standardController="Panel_Relationship__c" extensions="PanelMaintanenceExtension" id="page" cache="true" recordSetVar="unused" tabStyle="Panel_Maintenance__tab" showHeader="True" sidebar="True" title="Panel Maintenance">

<apex:form id="MassPanelUpdate">

<!-- Javascript Allows All Search Results to be Selected when Master Checkbox Checked or Deselect All Search Results when Master Checkbox Unchecked -->

<script type="text/javascript">
function customSelectChecked(form, element_name, value)
{
var i = 0;
for (i = 0; i < form.elements.length; i++) {
if (form.elements[i].name.search('selected') > 0 && form.elements[i].disabled == false) {
form.elements[i].checked = value;
}
}
}
function customSelectAllOrNoneByCheckbox(form, element_name, control)
{ customSelectChecked(form, element_name, control.checked); }
</script>

<apex:SectionHeader title="Panel Maintenance" subtitle="Search Page" />

<!-- Holds Search Criteria -->

<apex:pageBlock title="Search Criteria">

<apex:pageBlockSection title="Relationship Manager" columns="2" >

<apex:pageBlockSectionItem >Relationship Role Type
<apex:selectList value="{!RelationshipRoleType}" multiselect="false" size="1">
<apex:selectOption itemValue="BDM" />
<apex:selectOption itemValue="BDC" />
<apex:selectOption itemValue="PDM" />
<apex:selectOption itemValue="PDC" />
<apex:selectOption itemValue="NAM" />
</apex:selectList>

</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >Relationship Manager ID
<apex:inputText value="{!RelationshipManagerID}" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Relationship Manager State

<apex:selectCheckboxes value="{!RelationshipManagerState}" >
<apex:selectOption itemValue="NSW" itemLabel="NSW" />
<apex:selectOption itemValue="VIC" itemLabel="VIC" />
<apex:selectOption itemValue="ACT" itemLabel="ACT" />
<apex:selectOption itemValue="QLD" itemLabel="QLD" />
<apex:selectOption itemValue="SA" itemLabel="SA" />
<apex:selectOption itemValue="WA" itemLabel="WA" />
<apex:selectOption itemValue="TAS" itemLabel="TAS" />
<apex:selectOption itemValue="NT" itemLabel="NT" />
</apex:selectCheckboxes>

</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Relationship Manager Name
<apex:inputField value="{!Panel_Relationship__c.Relationship_Manager_Name__c}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Account Details" columns="2">
<apex:pageBlockSectionItem >Account Type *
<apex:selectList value="{!AccountType}" multiselect="false" size="1" required="True">
<apex:selectOption itemValue="Adviser" />
<apex:selectOption itemValue="Practice" />
<apex:selectOption itemValue="Licensee" />
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Account Name
<apex:inputField value="{!Panel_Relationship__c.Account_Name__c}" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Account State
<apex:selectCheckboxes value="{!AccountState}" >
<apex:selectOption itemValue="NSW" itemLabel="NSW" />
<apex:selectOption itemValue="QLD" itemLabel="QLD" />
<apex:selectOption itemValue="VIC" itemLabel="VIC" />
<apex:selectOption itemValue="ACT" itemLabel="ACT" />
<apex:selectOption itemValue="SA" itemLabel="SA" />
<apex:selectOption itemValue="WA" itemLabel="WA" />
<apex:selectOption itemValue="TAS" itemLabel="TAS" />
<apex:selectOption itemValue="NT" itemLabel="NT" />
</apex:selectCheckboxes>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Licensee Details" columns="2">
<apex:pageBlockSectionItem >Licensee Name
<apex:inputText value="{!LicenseeName}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Relationship Details" columns="2">
<apex:pageBlockSectionItem >Service Type
<apex:selectList value="{!ServiceType}" multiselect="false" size="1">
<apex:selectOption itemValue="Primary" />
<apex:selectOption itemValue="Secondary" />
</apex:selectList>
</apex:pageBlockSectionItem><br/>
</apex:pageBlockSection>

<apex:pageBlockButtons >
<apex:commandButton action="{!search}" value="Search" id="searchBtn"/>
</apex:pageBlockButtons>

</apex:pageBlock>

<!-- Display any Page Success or Error Messages -->

<apex:pageMessages ></apex:pageMessages>

<!-- Display Search Results -->

<apex:pageBlock title="Search Results" id="Results">

<apex:dataTable value="{!result}" var="Panel_Relationship__c" id="data" cellPadding="4" border="0" rowClasses="odd,even"
onrowmouseout="if (window.hiOff){hiOff(this);}" onrowmouseover="if (window.hiOn){hiOn(this);}">
<apex:facet name="caption"></apex:facet>
<apex:facet name="header"></apex:facet>
<apex:column >

<apex:facet name="header">

<!-- Allow All Search Results to be Selected when Checked or Deselect All Search Results when Unchecked -->

<apex:inputCheckbox id="selectall" onclick="javascript&colon;customSelectAllOrNoneByCheckbox(document.forms['Page:MassPanelUpdate'],'Page:MassPanelUpdate:Results:data:', this);"/></apex:facet>

<!-- Show Selected Search Results and Allow to Select or Deselect any Results Individually -->

<apex:inputCheckbox id="selected" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account Name</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_Name__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account ID</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_ID__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account State</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_State__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Role Type</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Role_Type__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Manager Name</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Relationship_Manager_Name__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Manager State</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Manager_State__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Service Type</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Service_Type__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Commencement Date</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Commencement_Date__c}"/>
</apex:column>

<apex:column >
<apex:facet name="header"><u>Last Modified Date</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.LastModifiedDate}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Last Modified By</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.LastModifiedByID}" />
</apex:column>

</apex:dataTable>

<apex:pageBlockButtons >
<apex:commandButton action="{!Remove}" styleClass="Button" value="Remove"/>
<apex:commandButton action="{!Add}" styleClass="Button" value="Add"/>
<apex:commandButton action="{!Change}" styleClass="Button" value="Change"/>
</apex:pageBlockButtons>

</apex:pageBlock>

</apex:form>

</apex:page>

 

Thanks in advance for any help with this and please feel free to comment on how I have structured my code as I have seen the getters and setters strucutred very differently in some code examples I have seen :)

 

 

 

Message Edited by JDog on 01-03-2010 06:34 PM

Hi would really appreciate anyone's help with this one as I have gone over it a hundred times and am really stuck.

 

I can't work out why but Salesforce isn't letting me set the current page in my test method - I have done this a hundred times before and it is still in all the examples Salesforce give in their documentation but I am consistently getting a compile error: Method does not exist or incorrect signature: Test.setCurrentPage(System.PageReference)

 

 

 

@isTest

private class QuoteWizardControllerTest 
{

    public static testMethod void QuoteWizardController() 
    {
    	// Set the pageRef to Quote 1
    	PageReference pageRef = Page.quote1;
    	
    	//Instantiate and construct the controller class.   
        QuoteWizardController controller = new QuoteWizardController();

        // Set the current page
        Test.setCurrentPage(pageRef);
 
     }
}

 

I am using API v19 however I have tried going back a few versions but still no joy.

 

Any help would be greatly appreciated with this one.

 

Cheers Jeremy

 

 

 

I have created a web2contact form using Sites however whenever you submit on the form you are presented with an "Authorization Required" error message.

 

Has anyone else come across this before ? 

 

I have checked everything including the Guest User Profile permissions, field level security on Contacts object etc. but all looks fine.

 

Really appreciate any help with this one !

I am trying to prevent all Users (bar Admin Profile) from creating Accounts except for record type x.

 

I have created a basic trigger below but am receving the error line 5: Comparison arguments must be compatible types: Schema.SObjectField, String - however I thought the below was represented as a string (in single quotes) ?

 

trigger NonAlignedPractice on Account (before insert) { for (Account TempAccount: System.Trigger.old) { if (Account.RecordTypeId != '01230000000LDuaAAG' && User.ProfileId != '00e300000018UCHAA2') TempAccount.addError('You can only create a Non-Aligned Practice.'); } }

 

Thanks for any help

I am trying to get the Salesforce Calendar Link to display on my VF page next to my field but am having no joy...

 

 

// Get Commencement Date for Add and Change Operations

public Date getCommencementDate() {

return null;

}

// Set Commencement Date for Add and Change Operations

public void setCommencementDate(Date CommencementDate) {

this.CommencementDate = CommencementDate;

}

 

---------------------------------------------

 

<apex:inputText value="{!CommencementDate}" />

 

 Salesforce won't allow me to display the input field as type inputField as it is not an SObject field. I have some javascript that displays a popup calendar but I would really like to use the native functionality if possible to retain the look and feel of the UI for users (as the javascript calendar actually pops up in a separate window).

 

Any help would be greatly appreciated.... 

 

Message Edited by JDog on 03-02-2010 11:57 PM
Quick query - I have 80% code coverage on my apex class yet my overall coverage is 70% as it is including my test method....do I need unit tests for my test methods ?

I have created test methods for my APEX code however I am unsure how to test the following which is still highlighted as uncovered.

Any help with how to go about this would be greatly appreciated !

public string fromUserID { get; set; } public string fromUserID1 { get; set; } public List<SelectOption> getfromUsers() { integer queryLimit = 5000; List<SelectOption> options = new List<SelectOption>(); options.add(new selectOption('', '--- select ---')); for (User u : [Select ID, Name FROM User Order by Name LIMIT :queryLimit]) { options.add(new selectOption(u.ID, u.Name)); } return options; } // Apply Search Criteria Values by User Input to SOQL Query public void search() { String queryFromUserID = FromUserID; String queryFromUserID1 = FromUserID1; // Run SOQL Query based on User Input if (FromUserID != null && FromUserID1 == null) { result = [ SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Relationship_Manager_State__c, Account_Name__c, Account_State__c, Account_Number__c, Relationship_Manager_Name__c, Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID, OwnerID FROM Panel_Relationship__c WHERE Relationship_Manager_ID__c like :queryFromUserID ORDER by Account_Name__c ]; } else if (FromUserID == null && FromUserID1 != null) { result = [ SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Relationship_Manager_State__c, Account_Name__c, Account_State__c, Account_Number__c, Relationship_Manager_Name__c, Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID, OwnerID FROM Panel_Relationship__c WHERE Account_Type__c like :queryfromUserID1 ORDER by Account_Name__c ]; }

 

 

 

I am relatively new to APEX and Visualforce and I am developing a VF page so users can search for records of a custom object and modify records either individually or en masse. I have created the VF page and Controller Extension and everything is working correctly except one part; I am trying to allow users to select multiple values to search a single field but I am receiving an error;

Error:

Conversion Error setting value 'NSW VIC' for '#{RelationshipManagerState}'

 

Any help with this problem would be greatly appreciated.

 

The section of the Controller Extension dealing with the dynamic SOQL is below with the sections I believe are giving me trouble highlighted in red;

 

 

/* Get Search Criteria Values */

public String getRelationshipRoleType() {
return null;
}

public String getRelationshipManagerID() {
return null;
}

public String getRelationshipManagerState() {
return null;
}


public String getAccountType() {
return null;
}

public String getAccountState() {
return null;
}

public String getLicenseeName() {
return null;
}

public String getServiceType() {
return null;
}

/* Set Results List */

public List<Panel_Relationship__c> result = new List<Panel_Relationship__c>();
private String RelationshipRoleType;
private String RelationshipManagerID;
private String RelationshipManagerState;
private String AccountType;
private String AccountState;
private String LicenseeName;
private String ServiceType;
public PanelMaintanenceExtension(){
}

public List<Panel_Relationship__c> getResult() {
return result;
}

/* Set Search Criteria Values */

public void setRelationshipRoleType(String RelationshipRoleType) {
this.RelationshipRoleType = RelationshipRoleType;
}

public void setRelationshipManagerID(String RelationshipManagerID) {
this.RelationshipManagerID = RelationshipManagerID;
}


public void setRelationshipManagerState(String RelationshipManagerState) {
this.RelationshipManagerState = RelationshipManagerState;
}

public void setAccountType(String AccountType) {
this.AccountType = AccountType;
}

public void setAccountState(String AccountState) {
this.AccountState = AccountState;
}

public void setLicenseeName(String LicenseeName) {
this.LicenseeName = LicenseeName;
}

public void setServiceType(String ServiceType) {
this.ServiceType = ServiceType;
}

/* Apply Search Criteria Values to Query and Run Query */

public void search() {
String queryRelationshipRoleType = RelationshipRoleType + '%';
String queryRelationshipManagerID = RelationshipManagerID + '%' ;
String queryRelationshipManagerState = RelationshipManagerState + '%';
String queryAccountType = AccountType;
String queryAccountState = AccountState = '%';
String queryLicenseeName = LicenseeName + '%';
String queryServiceType = ServiceType = '%';
result = [
SELECT Name, Role_Type__c, Relationship_Manager_ID__c, Manager_State__c,
Relationship_Manager_Name__c, Account_ID__c, Account_Name__c, Account_State__c,
Service_Type__c, Commencement_Date__c, LastModifiedDate, LastModifiedByID
FROM Panel_Relationship__c
WHERE Role_Type__c like :queryRelationshipRoleType
AND Relationship_Manager_ID__c like :queryRelationshipManagerID
AND Relationship_Manager_State__c like :queryRelationshipManagerState
AND Account_Type__c = :queryAccountType
AND Account_State__c like :queryAccountState
AND Licensee_Name__c like :queryLicenseeName
AND Service_Type__c like :queryServiceType ];

}

 

and the Visualforce Page is;

 

<apex:page standardController="Panel_Relationship__c" extensions="PanelMaintanenceExtension" id="page" cache="true" recordSetVar="unused" tabStyle="Panel_Maintenance__tab" showHeader="True" sidebar="True" title="Panel Maintenance">

<apex:form id="MassPanelUpdate">

<!-- Javascript Allows All Search Results to be Selected when Master Checkbox Checked or Deselect All Search Results when Master Checkbox Unchecked -->

<script type="text/javascript">
function customSelectChecked(form, element_name, value)
{
var i = 0;
for (i = 0; i < form.elements.length; i++) {
if (form.elements[i].name.search('selected') > 0 && form.elements[i].disabled == false) {
form.elements[i].checked = value;
}
}
}
function customSelectAllOrNoneByCheckbox(form, element_name, control)
{ customSelectChecked(form, element_name, control.checked); }
</script>

<apex:SectionHeader title="Panel Maintenance" subtitle="Search Page" />

<!-- Holds Search Criteria -->

<apex:pageBlock title="Search Criteria">

<apex:pageBlockSection title="Relationship Manager" columns="2" >

<apex:pageBlockSectionItem >Relationship Role Type
<apex:selectList value="{!RelationshipRoleType}" multiselect="false" size="1">
<apex:selectOption itemValue="BDM" />
<apex:selectOption itemValue="BDC" />
<apex:selectOption itemValue="PDM" />
<apex:selectOption itemValue="PDC" />
<apex:selectOption itemValue="NAM" />
</apex:selectList>

</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >Relationship Manager ID
<apex:inputText value="{!RelationshipManagerID}" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Relationship Manager State

<apex:selectCheckboxes value="{!RelationshipManagerState}" >
<apex:selectOption itemValue="NSW" itemLabel="NSW" />
<apex:selectOption itemValue="VIC" itemLabel="VIC" />
<apex:selectOption itemValue="ACT" itemLabel="ACT" />
<apex:selectOption itemValue="QLD" itemLabel="QLD" />
<apex:selectOption itemValue="SA" itemLabel="SA" />
<apex:selectOption itemValue="WA" itemLabel="WA" />
<apex:selectOption itemValue="TAS" itemLabel="TAS" />
<apex:selectOption itemValue="NT" itemLabel="NT" />
</apex:selectCheckboxes>

</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Relationship Manager Name
<apex:inputField value="{!Panel_Relationship__c.Relationship_Manager_Name__c}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Account Details" columns="2">
<apex:pageBlockSectionItem >Account Type *
<apex:selectList value="{!AccountType}" multiselect="false" size="1" required="True">
<apex:selectOption itemValue="Adviser" />
<apex:selectOption itemValue="Practice" />
<apex:selectOption itemValue="Licensee" />
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Account Name
<apex:inputField value="{!Panel_Relationship__c.Account_Name__c}" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >Account State
<apex:selectCheckboxes value="{!AccountState}" >
<apex:selectOption itemValue="NSW" itemLabel="NSW" />
<apex:selectOption itemValue="QLD" itemLabel="QLD" />
<apex:selectOption itemValue="VIC" itemLabel="VIC" />
<apex:selectOption itemValue="ACT" itemLabel="ACT" />
<apex:selectOption itemValue="SA" itemLabel="SA" />
<apex:selectOption itemValue="WA" itemLabel="WA" />
<apex:selectOption itemValue="TAS" itemLabel="TAS" />
<apex:selectOption itemValue="NT" itemLabel="NT" />
</apex:selectCheckboxes>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Licensee Details" columns="2">
<apex:pageBlockSectionItem >Licensee Name
<apex:inputText value="{!LicenseeName}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>

<apex:pageBlockSection title="Relationship Details" columns="2">
<apex:pageBlockSectionItem >Service Type
<apex:selectList value="{!ServiceType}" multiselect="false" size="1">
<apex:selectOption itemValue="Primary" />
<apex:selectOption itemValue="Secondary" />
</apex:selectList>
</apex:pageBlockSectionItem><br/>
</apex:pageBlockSection>

<apex:pageBlockButtons >
<apex:commandButton action="{!search}" value="Search" id="searchBtn"/>
</apex:pageBlockButtons>

</apex:pageBlock>

<!-- Display any Page Success or Error Messages -->

<apex:pageMessages ></apex:pageMessages>

<!-- Display Search Results -->

<apex:pageBlock title="Search Results" id="Results">

<apex:dataTable value="{!result}" var="Panel_Relationship__c" id="data" cellPadding="4" border="0" rowClasses="odd,even"
onrowmouseout="if (window.hiOff){hiOff(this);}" onrowmouseover="if (window.hiOn){hiOn(this);}">
<apex:facet name="caption"></apex:facet>
<apex:facet name="header"></apex:facet>
<apex:column >

<apex:facet name="header">

<!-- Allow All Search Results to be Selected when Checked or Deselect All Search Results when Unchecked -->

<apex:inputCheckbox id="selectall" onclick="javascript&colon;customSelectAllOrNoneByCheckbox(document.forms['Page:MassPanelUpdate'],'Page:MassPanelUpdate:Results:data:', this);"/></apex:facet>

<!-- Show Selected Search Results and Allow to Select or Deselect any Results Individually -->

<apex:inputCheckbox id="selected" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account Name</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_Name__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account ID</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_ID__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Account State</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Account_State__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Role Type</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Role_Type__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Manager Name</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Relationship_Manager_Name__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Manager State</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Manager_State__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Service Type</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Service_Type__c}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Commencement Date</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.Commencement_Date__c}"/>
</apex:column>

<apex:column >
<apex:facet name="header"><u>Last Modified Date</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.LastModifiedDate}" />
</apex:column>

<apex:column >
<apex:facet name="header"><u>Last Modified By</u></apex:facet>
<apex:outputField value="{!Panel_Relationship__c.LastModifiedByID}" />
</apex:column>

</apex:dataTable>

<apex:pageBlockButtons >
<apex:commandButton action="{!Remove}" styleClass="Button" value="Remove"/>
<apex:commandButton action="{!Add}" styleClass="Button" value="Add"/>
<apex:commandButton action="{!Change}" styleClass="Button" value="Change"/>
</apex:pageBlockButtons>

</apex:pageBlock>

</apex:form>

</apex:page>

 

Thanks in advance for any help with this and please feel free to comment on how I have structured my code as I have seen the getters and setters strucutred very differently in some code examples I have seen :)

 

 

 

Message Edited by JDog on 01-03-2010 06:34 PM