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
MichaelEmersonMichaelEmerson 

Need to create scrolling section of custom fields within our Opportunity object in salesforce.com

Quick question on adding some custom fields.  And let me state first I am totally new to visualforce development - although I know lots of programming languages.  Have not set up anything with Visualforce though!

My client wants to add a new section to their Opportunity object to define a sequence of events for the Opportunity.  They would like to have up to 50 instances of a set of three fields, but only show 5, then scroll down to see the rest.

Basically, they want one header, and then up to 50 sets of 3 fields (without individual labels) , but only 5 sets showing, and scroll to see the rest.  Hope that makes sense.  

So like the below showing in a scrolling section, and as you scroll down the rest of the fields are shown.  Can anyone help me with the best way to set this up??

They are in Professional Edition.

Thanks!


Due Date              Date Realized                 Sequence of Events

|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
                                                                                                                                                                           |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
                                                                                                                                                                           |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
                                                                                                                                                                           |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
                                                                                                                                                                           |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        |
|-----------|                    |-----------|                     |-----------------------------------------------------------------|        \/    

                                                                                                                                                     SCROLL to see more 

empucempuc

Hi Michael,

 

Im really sorry but I think it might be quite problematic because of Your professional edition. As You probably know Apex Classes are not available in such Salesforce version and for Your task, You would have to create a custom controller to support such case.

 

Best regards

SRKSRK
<div STYLE=" height: 120px; width: 100px; font-size: 12px; overflow: auto;">
<table bgcolor="green">
<thead style="position: fixed">
<tr><td bgcolor="#fafafa">hello</td></tr>
</thead>
<tbody style="overflow:scroll; max-height:100px; position:absolute; top:20px;">
<use apex repitet tp poulate data>
<apex:repite value="{!somelist}" var ="event">
<tr><td>event.name</td>
</tr>
</apex:repite>
</----->
</tbody>
</table>
</div>
MichaelEmersonMichaelEmerson

Thanks for the code SRK!

 

Do you know whether this will work in Professional Edition?

 

Thanks again!

empucempuc

It will not work as SRK reffers to a custom variable "{!somelist}" which requires a custom controller.

 

However one additional idea came to my mind. Maybe You could base Your page mainly on pure html and javascript, which could access SFDC db for any DML operation... 

 

You could try something like this:

 

http://boards.developerforce.com/t5/Visualforce-Development/SOQL-in-Javascript-amp-colon-Visualforce-page/td-p/422429

SRKSRK
What is the problem in using custom controller ???

And the idea that i want to convay is to use CSS
with a table where thead is fixed like this "<thead style="position: fixed"> "
& tbody is moving like this "<tbody style="overflow:scroll; max-height:100px; position:absolute; top:20px;">"

It all about CSS nothing related to any custom variable "{!somelist}"
I mention "{!somelist}" so i can represent the acces data in HTML you can acces data by any mean (i.e. javascript API or a custom controller)


& i believe it will work with Evey Edition?
SRKSRK
And please read the solution & try to understand it first before saying it's not working i know he was using the Professional Edition & i know apex class is not able able there

empucempuc

Custom controller = apex custom class, which is not supported by Michael's environment.

 

And no, solutionw ith custom apex controlelr will not work with every environment.

empucempuc

The first solution, which You've proposed was suggesting using a custom controller or it was looking like You were trying to do so (even the loop code which You've pasted was an APEX loop which needs to have an apex variable) That why I wrote so.