You need to sign in to do that
Don't have an account?
Trouble with tutorial: Adding a Controller
So i'm going through the workbook tutorial located here: http://www.salesforce.com/us/developer/docs/workbook/index.htm
I've been going through it fine, but now I have run into a problem. On Tutorial #9, Step 4 it is adding a controller to the page, and the code provided is not working. On the previous step, I had the following:
<apex:page standardStylesheets="false" showHeader="false" sidebar="false"> <apex:stylesheet value="{!URLFOR($Resource.styles, 'styles.css')}" /> <h1>Inventory Count Sheet</h1> </apex:page>
That worked fine, but now that I have gotten to step 4, I have this:
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" standardController="Merchandise__c"recordSetVar="products"> <apex:stylesheet value="{!URLFOR($Resource.Styles, 'styles.css')}" /> <h1>Inventory Count Sheet</h1> </apex:page>
However when I try to save this I get the error:
Error: CountSheet line 1, column 110: Element type "apex:page" must be followed by either attribute specifications, ">" or "/>" | ||
Error: Element type "apex:page" must be followed by either attribute specifications, ">" or "/>". |
In the tutorial it says to edit the first <apex:page> tag, which is what I beleive I did. And the error I am not quite getting because I have included attribute specifications and it ends with a >. Any help would be greatly appreciated. Thanks in advance
You are missing a space between "Merchandise__c" and recordSetVar, so that looked like an invalid attribute. (Error message is not exactly great...)
All Answers
You are missing a space between "Merchandise__c" and recordSetVar, so that looked like an invalid attribute. (Error message is not exactly great...)
ha wow, that cleared it right up. Thanks for the help :)
I'm having trouble, in a completely different way, with this same tutorial.
I'm using Safari 6.0.2 on a Macbook Pro. The tutorial, found here: http://www.salesforce.com/us/developer/docs/workbook/index.htm, specifically tutorial #9, step #3, discusses how to add a custom CSS file to stylize the visualForce page. I am performing each tutorial in my Org sandbox, not sure if that matters but I've been able to do each tutorial without incident so far.
I download the file from the instructions link, and it downloads unzipped as a folder. I right-click and compress the folder which creates a zip file on my desktop. I then follow the instructions to upload the zip file as a static resource into my SalesForce sandbox, setting the Cache Control to "Public" etc.
I then copy and paste the code below into my VisualForce page:
The result does not look anything like the workbook says it should. In fact, when I delete line 3 from the code it does not change the visual look at all. This tells me that, clearly, I am not accessing the CSS file that the code wants me to.
Please help! Thanks in advance :)