• tolio
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I recently enabled Cloud Scheduler, and now it messes up my visualforce pages. It seems to be a combination of both "showHeader=false" and "apex:form" that causes this calendar to show up, and I can't seem to make it go away.

 

Here's a very basic, watered down version of the problematic code:

<apex:page showHeader="false">
<apex:form >
do something.
</apex:form>
</apex:page>

 

And here's a screenshot of the page:

 

Any help is greatly appreciated. Thanks in advance.

  • July 21, 2011
  • Like
  • 0

I have a very strong technical background in web development, with hands-on professional experience from backend systems programming to front-end UI development. I have over 2 years of extensive salesforce development/administration experience with writing code in various areas of the system, including --

> Apex
> S-controls
> Triggers
> Workflow rules
> Approval processes (including auto-approval processes in apex, approval triggered via field updates, etc)
> Visualforce pages/controllers/components
> Reg-ex validation rules
> Adobe flex
> Dashboards and reportings (can build customized reports/dashboards using Visualforce or Flex as well)
> Email templates
> Setting up/managing roles and profiles
> customizing page layouts
> building custom objects, fields, object relationships 
 
I've worked with the following flavors of Salesforce:
> Unlimited
> Enterprise
> Customer Portal
> One-App
 
Please send me an email for resume and references. Serious inquiries only!

  • April 13, 2009
  • Like
  • 0

Hi all,

 

I recently came across a problem where I had a Visualforce page displayed on a page layout and the height of it needed to be defined according to how many records were returned in the list I was displaying. After doing a little poking around, I came up with a cool solution I am happy to share. First step, the div that displays the Visualforce page is actually given the id of the Visualforce page itself - so you need to first find the id of the Visualforce page. Next, create an S-Control to do an onload resizing of this particular div element based on a query defined within the script itself. Below is an example of resizing a Visualforce page displayed on the account that displays a list of active contacts.

 

<script type="text/javascript" src="/js/functions.js"></script> 
<script src="/soap/ajax/12.0/connection.js"></script> 
<script type="text/javascript">
window.onload = resizeWindow(); 
function resizeWindow(){
	//Ensure a valid Salesforce connection.
	sforce.connection.sessionId = "{!API.Session_ID}"; 
	//Set account id of account used in contact query.
	var accountid = "{!Account.Id}";
	//Retrieve a list of contacts on the account that are not inactive.
	result = sforce.connection.query("Select Id from Contact where AccountId = '"+accountid+"' and Inactive__c != true"); 
	//Create a pixel variable to assign the dynamic height. This example adds an extra 50px to display the top part of the page in 	the case no records are retrieved.
	contactsize = result.getArray("records").length*30+50+'px';
	//Retrieve the height of the div the Visualforce page lies in and set it to the new dynamic size. The id is the actual id of 	the Visualforce page.
	top.document.getElementById("066P00000008bke").height = contactsize;
	}
</script>

 

Next, add this S-Control to the page layout with a height of 0px and this should resize your page onload. Enjoy!