• oldtown
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
<apex:page cache="false" expires="1" controller="PerfRevMyMgrReview" showHeader="false" standardStylesheets="true">

<apex:composition template="{!$Site.Template}"><

apex:define name="body">

<apex:form ><

font size="3">

<apex:pageBlock title="Business Goals" mode="edit"></font>

<table cellspacing="0" cellpadding="0" width="100%" border="0">

<tr><td>

<apex:outputLabel value="Increase Student Success:" for="BusinessGoals1"/>

</td><td> 

<apex:inputField value="{!PR.BusinessGoals1__c}" id="BusinessGoals1"/></

td></tr>

 </table>

 </apex:form>

</apex:define>

</apex:composition>

 

</apex:page>

 

public with sharing class PerfRevMyMgrReview {

 

public PerfRevMyMgrReview() {

PageReference pageRef = System.currentPageReference();

RecordType r = [select Id from RecordType where name='MidYearManager'];

PR =

new PerformanceReview__c(RecordTypeId=r.id);

}

private PerformanceReview__c PR;

public void setPR(PerformanceReview__c v){

PR=v;

}

public PerformanceReview__c getPR(){

return PR;

}

 

}.

 

PR is a custom Object with several recordtypes defined

BusinessGoals1__c is a pick list which is filtered by record type

if I create a new PR in Salesforce it asks me to select the recordtype, doing so then shows the correct filtered pick list contents.

When I use a force.com custom page and a custom controller. it doesn't filter the pick list.

I an setting the recordtype when I create a new instance and doing so in the constructor of the custom class.

this all compiles aned deploys fine, works ok except for the extra elements in the pick list.

I can remove them using javascript but this seems like a poor solution.

I have tried using a standardcontroller and setting the recordtype in the constructor also which produced the same result.

 

Anyone else run into this and did you find a solution?

thanks

in advance

<apex:page cache="false" expires="1" controller="PerfRevMyMgrReview" showHeader="false" standardStylesheets="true">

<apex:composition template="{!$Site.Template}"><

apex:define name="body">

<apex:form ><

font size="3">

<apex:pageBlock title="Business Goals" mode="edit"></font>

<table cellspacing="0" cellpadding="0" width="100%" border="0">

<tr><td>

<apex:outputLabel value="Increase Student Success:" for="BusinessGoals1"/>

</td><td> 

<apex:inputField value="{!PR.BusinessGoals1__c}" id="BusinessGoals1"/></

td></tr>

 </table>

 </apex:form>

</apex:define>

</apex:composition>

 

</apex:page>

 

public with sharing class PerfRevMyMgrReview {

 

public PerfRevMyMgrReview() {

PageReference pageRef = System.currentPageReference();

RecordType r = [select Id from RecordType where name='MidYearManager'];

PR =

new PerformanceReview__c(RecordTypeId=r.id);

}

private PerformanceReview__c PR;

public void setPR(PerformanceReview__c v){

PR=v;

}

public PerformanceReview__c getPR(){

return PR;

}

 

}.

 

PR is a custom Object with several recordtypes defined

BusinessGoals1__c is a pick list which is filtered by record type

if I create a new PR in Salesforce it asks me to select the recordtype, doing so then shows the correct filtered pick list contents.

When I use a force.com custom page and a custom controller. it doesn't filter the pick list.

I an setting the recordtype when I create a new instance and doing so in the constructor of the custom class.

this all compiles aned deploys fine, works ok except for the extra elements in the pick list.

I can remove them using javascript but this seems like a poor solution.

I have tried using a standardcontroller and setting the recordtype in the constructor also which produced the same result.

 

Anyone else run into this and did you find a solution?

thanks

in advance