4

I am trying to make a customization to the detail edit page of my Opportunities. Since I am trying to show properties of a lookup value as it is changed, I need to do it in Visualforce. Looking through the VisualForce docs, i can see ways to render the entire detail edit page, or to create my own in markup.

I need to render a changing field somewhere in the middle of the form, right after another field. If I re-create the entire edit page, I am worried that it will become completely un-maintainable to add properties to the Opportunity, but if I use the standard detail view, I can't see any way to add my meta information except after the entire form, which would disconnect the data I need to display from the field it is related to.

Is there any solution to my quandry?

2

Check out Field Sets and code for dynamically accessing them in Visualforce. You can write your code once and your admin can maintain the field sets going forward without ever having to touch the code.

  • Do you know where I can find documentation on referencing specific fields in a fieldset? Do you know if that is even possible? I think I need to in order to bind to specific fields. – AlexTopHat Dec 4 '13 at 1:47
  • You specify the fields in the Field Set through the GUI and then get their values using the fieldPath, with the idea being that you don't need to know the specific fields. If you need a specific field then you can just access it without Field Sets. Possibly overkill, you could create a custom setting to specify anything extra (such as an exception field) and vary behavior based on that. You might also be able to use the `$ObjectType global variable' depending on your implementation. – Peter Knolle Dec 4 '13 at 12:52
0

Have you considered adding the Visualforce page to a section of the page layout and enabling inline editing for the related field?

Another possibility might be putting the required field into Visual Flow with the related information displayed in the same Visualforce page, and then adding that VF page to a section on the page layout.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.