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
icemft1976icemft1976 

Is there a bug or limitation for 'inlineedit' when using dependent picklists?

I have a custom "Project" object that has a few dependent picklists, in a couple of them one field controls multiple fields ( i.e. Division > Product ; Division > Stages )

 

Whenever i try to include these 3 fields on a pageBlockTable with inlineedit support, it always says "Divisions needs to be present"  - even though it is.

 

If I use an "apex:repeat" and build my own table, though it seems to work. And if I use a "apex:detail" component and set inlineedit to true, however, it works. Which is fine but I'm trying to enable mass edit of my Projects object via inlineidt and a set controller. So detail is not helpful.  Has this ever been documented by anyone? I can't find any references to it. 

 

I'm wondering if this is a bug/limitation of the inlineedit mechanism. I could see how it could complicate things too much given the fact the javascript for the dependent editable fields is built at runtime .

 

Thanks for any insight you might have. 

 

works: 

    <table>
    <apex:repeat value="{!projectsList}" var="proj">
    <tr>
        <td><apex:outputField value="{!proj.Divisions__c}" /></td> 
        <td><apex:outputField value="{!proj.Product__c}" /></td>   
        <td><apex:outputField value="{!proj.Programs__c}" /></td> 
        <td><apex:outputField value="{!proj.Stage__c}" /></td>   
        <td><apex:outputField value="{!proj.Project_Manager__r.name}" /></td> 
        <td><apex:outputField value="{!proj.Lead_Analyst__r.Name}" /></td> 
        <td><apex:outputField value="{!proj.Project_Reviewer__r.name}" /></td>           
        <td><apex:outputField value="{!proj.Name}" /></td> 
        <td><apex:outputField value="{!proj.Project_Type__c}" /></td> 
        <td><apex:outputField value="{!proj.Program_Family2__c}" /></td> 
        <td><apex:outputField value="{!proj.Account__r.Name}" /></td> 
        <td><apex:outputField value="{!proj.Urgent__c}" /></td> 
        <td><apex:outputField value="{!proj.Forecasted_Delivery_Date__c}" /></td> 
        <td><apex:outputField value="{!proj.Client_Services_Advisor__r.Name}" /></td> 
        <td><apex:outputField value="{!proj.Notes__c}" /></td> 
        <td><apex:outputField value="{!proj.Ranking__c}" /></td> 
    </tr>
    <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"  hideOnEdit="editButton" event="ondblclick"  changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>  
    </apex:repeat>

 

 

does not work: 

Visualforce Error

The inline edit-enabled dependent picklist 'Product' requires its controlling field 'Division' to be present on the page.

 

    <apex:pageBlockTable value="{!projectsList}" var="proj">
        <apex:column value="{!proj.Divisions__c}" /> 
        <apex:column value="{!proj.Product__c}" />  
        <apex:column value="{!proj.Stage__c}" />  
        <apex:column value="{!proj.Project_Manager__r.name}" />
        <apex:column value="{!proj.Lead_Analyst__r.Name}" />
        <apex:column value="{!proj.Project_Reviewer__r.name}" />          
        <apex:column value="{!proj.Name}" />
        <apex:column value="{!proj.Project_Type__c}" />
        <apex:column value="{!proj.Program_Family2__c}" />
        <apex:column value="{!proj.Account__r.Name}" />
        <apex:column value="{!proj.Urgent__c}" />
        <apex:column value="{!proj.Forecasted_Delivery_Date__c}" />
        <apex:column value="{!proj.Client_Services_Advisor__r.Name}" />
        <apex:column value="{!proj.Notes__c}" />
        <apex:column value="{!proj.Ranking__c}" /> 
        <apex:inlineEditSupport event="ondblClick"  showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" /> 
    </apex:pageBlockTable> 

 

Mona Das 7Mona Das 7
I guess you are missing the controlling field "division" for your dependent field "product" in your page. Following code generates same eror for me but it works fine if I include the controlling field by uncommenting the lines shown below
<apex:page standardController="Account" recordSetvar="accs">
	<apex:form >
		<apex:pageBlock mode="edit">
			<apex:pageBlockButtons >
			<apex:commandButton action="{!save}" value="Save"/>
			</apex:pageBlockButtons>
			
			<apex:pageBlockSection title="Dependent Picklists" columns="2">
				<apex:pageBlockTable value="{!accs}" var="ac" > 
<!-- 					<apex:column headerValue="Industry"> -->
<!-- 						<apex:outputfield value="{!ac.industry}" /> -->
<!-- 					</apex:column> -->
					
					<apex:column headerValue="SubCategory">
						<apex:outputfield value="{!ac.Subcategories__c}" />    
					</apex:column>
						
					<apex:inlineEditSupport event="ondblClick" />  
				</apex:pageBlockTable>
			</apex:pageBlockSection>
		</apex:pageBlock>
	</apex:form>
</apex:page>