function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IvarIvar 

New field dependencies in pages

Hi all.

 

Does anyone know how the new field dependency availability (Summer '10) in Visualforce Pages is supposed to work? I am able to implement the feature when I use a standard controller (as per the example in the release notes), but as soon as the object I want to utilize the dependencies on is delivered to the page through a controller extension it doesn't seem to work.

 

Anybody know if this is intended behavior, or if there is a way around this?

 

Regards,

Ivar Gunnarsson

Best Answer chosen by Admin (Salesforce Developers) 
AvromAvrom

And just to check, this page does have API v.19, correct?

All Answers

AvromAvrom

Hi Ivar,

 

Can you provide some more specific information, such as your markup/code? That would help to diagnose and solve your issue.

IvarIvar

Thanks for the reply... sure thing. Here are a few key elements from my markup and code:

 

 

<apex:page sidebar="false"  standardController="CustomLead__c" extensions="VF_SaleLineItemController"> 
.
.
.
<apex:actionFunction name="saveEdit" action="{!saveEdit}"/>
    
    <apex:pageBlock title="Bæta við nýrri Sölulínu" mode="edit">
      Vöruflokkur:   <apex:inputField value="{!newLine.plProductCategory__c}"/> 
      Afgreiðsla:   <apex:inputField value="{!newLine.plTransactionType__c}"/> 
.
.

 

 

The above two inputFields have a dependency defined where the latter depends on the former. And here is a snippet from my controller that serves as the extension in the page and provides that object (newLine)

 

 

public class VF_SaleLineItemController {
  
   public SaleItemLine__c newLine {get;set;}

.
.
.
}

 

 

Pretty straight forward I would think, but when displayed on the page above the dependencies don't work and the latter field always displays a full set of options no matter what is selected in the former one.

 

Hope this clarifies somewhat.

 

Rgs.

Ivar

AvromAvrom

And just to check, this page does have API v.19, correct?

This was selected as the best answer
IvarIvar

Thanks Avrom. That was it. I forgot to update the API version of the page. Works like a charm now!