• Mona Das 7
  • NEWBIE
  • 5 Points
  • Member since 2015

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

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> 

 

I have a custom object that has a lookup to Opportunity. On the field's edit page, In the new "Lookup Options" section, I can see two of the three documented options for "What to do if the lookup record is deleted:"

 

+ Clear the value of this field.

+ Don't allow deletion of the lookup record that's part of a lookup relationship.

 

However, I don't see the third option that's described in the documentation: "Delete this record also."

 

Per the documentation (http://developer.force.com/releases/release/Summer12/lookup+relationship+enhancements):

 

"Delete this record also Available only if a custom object contains the lookup relationship, not if it’s contained by a standard object. However, the lookup object can be either standard or custom. Choose when the lookup field and its associated record are tightly coupled and you want to completely delete related data."

 

My lookup field is defined on a custom object. Why can't i see this option when I edit the field? (I also don't see if when I create a new lookup field on the custom object.)

Hi ,

I am learning how to use visualforce. And I copy an example of visualforce developer guide.  And when I save to salesforce server from ecilpse, I meet this error message"Attribute taborderhint is not supported for <apex:inputField> when this component is a direct or indirect child of <apex:dataTable>". codes as below:

<apex:page controller="OppsController">
<apex:form>
<apex:dataTable value="{!OpportunitiesWithIndex}" var="oppWrapped">
<apex:column>
<apex:facet name="header">Opportunity</apex:facet>
<apex:outputField value="{!oppWrapped.opp.name}"/>
</apex:column>
<apex:column>
<apex:facet name="header">Amount</apex:facet>
<apex:inputField value="{!oppWrapped.opp.amount}"
taborderhint="{!oppWrapped.tabIndex}"/>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:page>

 

 

apex:

public class OppsController {
// Get a set of Opportunities
public ApexPages.StandardSetController setCon {
get {
if(setCon == null) {
setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
[SELECT name, type, amount, closedate FROM Opportunity]));
setCon.setPageSize(5);
}
return setCon;
}
set;
}
public List<Opportunity> getOpportunities() {
return (List<Opportunity>) setCon.getRecords();
}
public List<OppWrapper> getOpportunitiesWithIndex() {
List<Opportunity> opps = this.getOpportunities();
List<OppWrapper> oppsWrapped = new List<OppWrapper>();
Integer idex = 1;
for (Opportunity opp : opps) {
oppsWrapped.add(new OppWrapper(opp, idex));
idex++;
}
return oppsWrapped;
}