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
InfopiaInfopia 

$CurrentPage Global Variable?

Did the $CurrentPage variable changed?  I get the following error:  “Error: Field $CurrentPage.parameters.relatedId does not exist. Check spelling.”

when I just create this simple page (which is in the Global Variables section of the dev guide):

 

<apex:page standardController="Account">

   <apex:pageBlock title="Hello {!$User.FirstName}!">You belong to the {!account.name} account.</apex:pageBlock>

  <apex:detail subject="{!account}" relatedList="false"/>

  <apex:relatedList list="OpenActivities" subject="{!$CurrentPage.parameters.relatedId}" />

</apex:page>

 

Thanks,

Jon

jwetzlerjwetzler
Has your instance been updated to Summer '08 yet?

You'll need to use $CurrentPageReference for Spring '08.


Message Edited by jwetzler on 05-30-2008 03:19 PM
InfopiaInfopia
Great, thanks!
ChrisAtkinsChrisAtkins
I have same issue with European instance -- na2 -- so it appears that I am running the Spring 08 version.
 
How does one discern whch version is being run?
 
Also have probably similar issues with some other examples in the Visual Developer Guide:
 

 In example controller code below, I get following error

Error: Compile Error: Method does not exist or incorrect signature: ApexPages.currentPage() at line 21 column 21

 

  public Account getAccount() {

    if(account == null)

      account = [select id, name, numberoflocations__c from Account

        where id = :ApexPages.currentPage().getParameters().get('id')];

   return account;

  }

jwetzlerjwetzler
The Summer '08 release schedule can be found on our trust site, at the bottom of this page:
http://trust.salesforce.com/trust/status/

You're still on Spring '08.


You should use System.currentPageReference() for what you are trying to do.  It will still work in Summer '08 but once you are upgraded it would be best to switch to ApexPages.currentPage().
ChrisAtkinsChrisAtkins

Thanks for the response J. 

The servers which I use are being upgraded on 15th and 16th.  I think is reasonable to assume this will enable Visual Force Summer 08 on all versions, not just Developer, so I can then have fun to trying to export/import visual force packages.

dchasmandchasman
Packaging of visualforce components and pages is not supported in Summer '08 - it is something we are actively working on now for a future release.

However, Summer '08 does include full Meta Data API support for visualforce components and pages.
ChrisAtkinsChrisAtkins

Thanks for the advice, D.   

I have a relatively simple application under development Org using VF functionality (that is controller classes and pages) and a few custom objects. 

My company has thrown me in as their one and only SF developer/administrator/user 3 weeks ago.  I have convinced my PM that VS is the way to go on the grounds that I am still clueless on developing S-Controls.  But the project itself is due for internal delivery this June.

How then will I get this application into an Enterprise Org following the Summer '08 update? 

 

 

 

 

 

 



dchasman wrote:
Packaging of visualforce components and pages is not supported in Summer '08 - it is something we are actively working on now for a future release.

However, Summer '08 does include full Meta Data API support for visualforce components and pages.



ChrisAtkinsChrisAtkins

In response to my own question:

How then will I get this application into an Enterprise Org following the Summer '08 update? 

The answer(s) appear to be in the Salesforce_apex_language_reference.pdf document (Summer '08), chapter 10, "Deploying Apex Scripts".   It does not appear as user-friendly as package export/import.

The above document is reference in the Apex section of this page:

http://wiki.apexdevnet.com/index.php/Apex_and_Visualforce