• MFriel
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I have a field set (LILLY_QR_OL_SR) setup for a custom object (Standing_Request__c) and want to iterate through that set displaying the label for the field and then the value in table format.  This works great until I attempt to us a lookup.  I want to display the Owner's first name and last, owner is a lookup to a user.  When I add in the lookup fields for first name and last I get this error....

Unknown property '$ObjectType.Standing_Request__c.fields.User__r'

 

Here is the section of the VF page that is relevant...

 

<table>
<apex:repeat value="!$ObjectType.Standing_Request__c.FieldSets.LILLY_QR_OL_SR}" var="f">
 <tr>
  <td>
   <apex:outputText value="!$ObjectType.Standing_Request__c.Fields[f].label}" />
  </td>     	
  <td>
   <apex:outputText value="{!obj[f]}"/>
  </td>
 </tr>
</apex:repeat>
</table>

 

 

I have a field set (LILLY_QR_OL_SR) setup for a custom object (Standing_Request__c) and want to iterate through that set displaying the label for the field and then the value in table format.  This works great until I attempt to us a lookup.  I want to display the Owner's first name and last, owner is a lookup to a user.  When I add in the lookup fields for first name and last I get this error....

Unknown property '$ObjectType.Standing_Request__c.fields.User__r'

 

Here is the section of the VF page that is relevant...

 

<table>
<apex:repeat value="!$ObjectType.Standing_Request__c.FieldSets.LILLY_QR_OL_SR}" var="f">
 <tr>
  <td>
   <apex:outputText value="!$ObjectType.Standing_Request__c.Fields[f].label}" />
  </td>     	
  <td>
   <apex:outputText value="{!obj[f]}"/>
  </td>
 </tr>
</apex:repeat>
</table>

 

 


I have a VF page for a standard object that uses standard controller and a controller extension. When an invalid object Id is passed, or record is unavailable (deleted or due to permissions), the standard controller throws the "hard-error" and the error is displayed in the standard SFDC UI (with the sidebar and header). My application has a completely cusom UI and I do not want to be "thrown" into the standard SFDC UI in case of an error. I tried to trap the error in the extension controller class, but it looks like standard controller traps it first and does not allow me to put in place any custom error handling.

Any suggestions?

  • November 20, 2008
  • Like
  • 0