• JDawg808
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi Everyone,

 

I wanted to see if anyone has any suggestions as to whether or not what I want to do is possible. I have looked through the cookbook as well as the developer handbook and googled as well and have not found any examples that do what I am looking for.

 

basically what i am trying to do is mimic the view/edit/save functionality that is present on all SFDC objects. The catch is that I am trying to do this in a Visualforce page that will contain 2 tabs with data from the same object. One tab will contain the main contact data and the other tab will contains some additional data (the data is very flat so keep that in mind) that is also part of the contact object. 

 

The 2 options to would be idea are as follows

 

1) Have an edit button enable all the fields in the contact object on all tabs

 

or 

 

2) Have an edit button on each tab that would enable just the fields on that tab

 

Part of the reason we are looking to do this is that they have a large number of fields in the contact object and it would help to segment their business processes a bit more clearly, as well as minimize vertical scrolling for the user.

 

If anyone has any thoughts on how to achive this and is will to share the information, i would be really appreciative.

 

Thanks,

Jason

Hi there. I have the following code that leverages a custom object called "Test__c", that has
1 field, which is a lookup to Accounts.

Code:
<apex:page standardController="Test__c" tabStyle="Test__c">
    <apex:sectionHeader title="{!$ObjectType.Test__c.label} Edit" subtitle="New Test"/>
    <apex:form>
    <apex:pageBlock title="Test">
        <apex:pageBlockButtons>
            <apex:commandButton value="Save" action="{!save}" />
            <apex:commandButton value="Cancel" action="{!cancel}" />
        </apex:pageBlockButtons>
    <apex:actionRegion>
        <apex:pageBlockSection title="Information">
            <apex:inputField value="{!Test__c.Account__c}">
                <apex:actionSupport event="onselect" rerender="otherPanel" />
            </apex:inputField>
        </apex:pageBlockSection> 
    </apex:actionRegion>  
    
    <apex:pageBlockSection title="test" id="otherPanel" rendered="true">
        <apex:outputField value="{!Test__c.Account__c}" />
    </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
</apex:page>

Now, when I type a value into the lookup box and I select a value from the autocomplete, the value in the "test" pageBlockSection will update in an Ajax fashion like so:
 

But when I use the lookup dialog to select an account, the field will not update:


Any ideas??
Thanks
  • December 10, 2008
  • Like
  • 1