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
warrenlesterwarrenlester 

Inline S-Controls

I have built an S Control that I want to place inside a related page. In this case, I calculate GM for an opportunity and then want to display this on my Sales Order record.
 
Writing code to do this was easy, but I can't work out how to format the output to match the style of the other dataCol and labelCol elements.
 
Any ideas? Has anybody else done this?
 
Warren Lester
jf317820jf317820
link up with the sfdc style sheets
Greg HGreg H
If your inline sControl is imbedded in the layout of your detail page then simply linking to the salesforce stylesheets may not work correctly.  This is due to the fact that the ".labelCol", ".dataCol" and ".data2Col" (as written in the common.css file) have cascading styles built on top of them.  More specifically, you would need to have your table/div (where the results are listed) embedded into divs with at least the styles ".bPageBlock" and ".detailList" declared prior to the ".labelCol", ".dataCol" and ".data2Col" declarations.
 
To get the desired effect without linking to the common.css file and not trying to embed your results into additional div tags you could use the following code:
Code:
<style type="text/css">
.labelCol {background-color:#F3F3EC; padding:2px 10px 2px 2px; text-align:right; font-size: 91%; font-weight: bold; color:#333; width: 18%;}
.dataCol {background-color:#F3F3EC; padding:2px 2px 2px 10px; text-align:left; width:32%;}
.data2Col {padding: 2px 2px 2px 10px; text-align: left; width: 82%;}
.col02 {border-right: 20px solid #F3F3EC;}
th.last, td.last {border-bottom:none;}
</style>

This may require some tweaking but it should get you closer than you are now.
 
This is difficult to write without displaying a lot of code so let me know if you would like to see something else.
 
Thanks,
-greg
warrenlesterwarrenlester
Greg,
 
Thanks, that is a lot closer to what I want and works OK for 2 column layouts, but not single column page layouts.
 
Regards,
Warren