You need to sign in to do that
Don't have an account?
Jeff C.ax327
Possible to call an APEX method as an S-Control merge field?
I need to create a button that launches a new url in a separate window. I need to do some custom coding to properly build the url, i.e., I need to query a couple objects and build the URL from the values returned. The standard merge fields won't work because the other objects I need info from are not in scope. Is there any way to call an APEX method as a merge field?
Like this?
{! myApexClass.getSpecialUrl( Contact.Id ) }
Or... is there a different way I can accomplish this? I'd rather not use client-side javascript because I don't want to hard-code the window open properties.
Your controller would need to fetch the Contact Id from the url vars like
String cId = ApexPages.currentPage().getParameters().get('contactid');
Make your S-Control bring up the VF page and it will redirect to whatever the getSpecialUrl returns.
Hope this gives you something to work with.
David
Concerning your question :
Your sandbox will probably be on the cs0 or cs2 server. These are already in Winter09. The Visualforce page as a source for a custom button or link is one of the new features.
You can see on http://trust.salesforce.com/trust/status/#maint when your production will be Winter09 too.
You can create this already in your sandbox and wait until your production is Winter09 to deploy.
If you can't wait that long, you can probably get away with creating a button or link of type 'URL' and use as the URL something like /apex/yourpagename?myvar1={!...}
David