You need to sign in to do that
Don't have an account?
Dan Broussard
Passed CreateView Trailhead challenge BUT:
In the Trailhead section, Visualforece, Create View, I passed the test just fine.
When I wanted to see the result with an actual contact "id" https://na24.salesforce.com/0031a000003qngx
copied to the end of the url like this:
https://c.na24.visual.force.com/apex/ContactView/&id=0031a000003qngx or with no last "/"
https://c.na24.visual.force.com/apex/ContactView&id=0031a000003qngx
I get the following error
"The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores. "
To what "name" do they reference?I have to be doing something really dumb!
Any help is appreciated
Here is my code:
<apex:page sidebar="false" standardController="Contact">
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page: ContactView
<!-- End Default Content REMOVE THIS -->
<apex:pageBlock title="Contact Information">
<apex:pageBlockSection >
First Name: {! Contact.FirstName } <br/>
Last Name: {! Contact.LastName} <br/>
Owner's Email:{! Contact.Owner.Email} <br/>
Phone: {! Contact.Phone } <br/>
Industry: {! Contact.Account.Industry } <br/>
Revenue: {! Contact.Account.AnnualRevenue } <br/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
When I wanted to see the result with an actual contact "id" https://na24.salesforce.com/0031a000003qngx
copied to the end of the url like this:
https://c.na24.visual.force.com/apex/ContactView/&id=0031a000003qngx or with no last "/"
https://c.na24.visual.force.com/apex/ContactView&id=0031a000003qngx
I get the following error
"The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores. "
To what "name" do they reference?I have to be doing something really dumb!
Any help is appreciated
Here is my code:
<apex:page sidebar="false" standardController="Contact">
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page: ContactView
<!-- End Default Content REMOVE THIS -->
<apex:pageBlock title="Contact Information">
<apex:pageBlockSection >
First Name: {! Contact.FirstName } <br/>
Last Name: {! Contact.LastName} <br/>
Owner's Email:{! Contact.Owner.Email} <br/>
Phone: {! Contact.Phone } <br/>
Industry: {! Contact.Account.Industry } <br/>
Revenue: {! Contact.Account.AnnualRevenue } <br/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
https://c.na24.visual.force.com/apex/ContactView?id=0031a000003qngx
Note the question mark instead of the ampersand. The Ampersand is used to seperate / concatenate multiple URL variables, it all starts with the question mark. =)
All Answers
This is how you can pass id to VF page -
https://c.na24.visual.force.com/apex/ContactView?id=0031a000003qngx
Please let me know if this is helpful.
Regards,
Shashi
https://c.na24.visual.force.com/apex/ContactView?id=0031a000003qngx
Note the question mark instead of the ampersand. The Ampersand is used to seperate / concatenate multiple URL variables, it all starts with the question mark. =)
Old eye balls failed me again!
Thank you very much, I completely missed the error!