Vista personalizada para la lista relacionada

I'm a bit new to SalesForce development, i've been given a small list of changes to make and most i've done but I want to go the extra mile on one if possible.

I want to know if it is possible to have a custom view (using a visual force page if necessary) for a related list.

We have a customised section under opportunities which shows items related to another group of items (in this case, rooms within a building and items within the room), they want a free text field (there's a description field already) displaying on a custom page layout.

Currently this is set to a related list and picks items from a table and shows them horizontally, however, now i've amended this list to show the description field it is starting to look a bit squashed.

Ideally i'd like the description on a second line so that each detail line has all the general details about a room (these items relate to products) on the first line and then the description on a second and then repeat for each set of item lines.

In something like PHP this would be very simple:

foreach ($data as $record) {
  echo $record->item_number . " : " . $record->item_name . " : " . $record->item_quantity ." : ". $record->item_extended_price . "<br>\n";
  echo $record->item_description . "<br>\n";

Is there a way to change the display setting so it points to a visual force page so I can use some markup to display the data or is there a simpler way to get a line-break when customising the related list view.

Muchas Gracias

preguntado el 09 de marzo de 12 a las 15:03

2 Respuestas

If you want to customize the related list, you should write your own related list with a VisualForce component. Then, you can customize it an any way that you'd like.

Mira esto repositorio github that contains the code from a CloudSpokes contest that relates to this.

respondido 09 mar '12, 16:03

I think related lists are off limits as you're describing. You could create a VF page to implement the related list functionality and embed it as a section in the page layout. If you placed it toward the bottom it might seem more like a related list.

respondido 09 mar '12, 16:03

Thanks for the responses Sean and Jeremy, I was waiting to see if the community would up-vote one over the other. I think both have merit and either approach would work. I'm having so much trouble with VF stuff that i'd probably lean towards the component level personally. - jamesb

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.