You need to sign in to do that
Don't have an account?
KellyKanches
New to APEX - Help with simple VF page
Hi All,
I am new to APEX in regards to creating VF pages.
I keep getting errors on lines 118 and I can't seem to figure it out. Can someone help me please?
<apex:page tabStyle="Account" standardController="Account">
<style >
p {
font-size:16px;
}
.beenWorkingOut {
font-size:16px;
}
.paraCrunch {
margin-left:10%;
margin-right:10%;
}
a {
text-decoration:none;
}
</style>
<apex:pageBlock title="MealViewer Initial Call to Customer Checklist">
<apex:pageBlockSection title="Summary" columns="2">
<apex:outputField value="{!Account.Phone}"/>
<apex:outputField value="{!Account.Name}"/>
<apex:pageBlockSectionItem />
<apex:pageBlockSectionItem />
<apex:pageBlockSectionItem />
<apex:outputLink onClick="window.open('/{!account.id}')">(View Account)</apex:outputLink>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:form >
<span style="float:right">
<apex:commandButton action="{!save}" value="Save" />
<apex:commandLink onclick="return confirm('Are you sure you want to cancel? All changes will be lost!');" action="{!cancel}" value="cancel"/>
</span>
<br /><br /><br />
<span style="float:right; font-size:12px; color:grey;">version 1.0 - revised 2015.04.07</span>
<apex:pageBlock title="Details">
<apex:pageBlockSection title="Introduction and Product Review" columns="2">
<p class="paraCrunch">
My name is <b>{!$User.FirstName} {!$User.LastName}</b> and I'm going to be taking care of you as your Onboarding Specialist here at MealViewer! Do you have a few minutes?
</p>
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li>Product Summary</li>
<ul>
<li><a id="one1" href="#" style="color:black;" onclick="setColorById('one1','green');return false;">Ask the Questions</a></li>
<li><a id="one2" href="#" style="color:black;" onclick="setColorById('one2','green');return false;">Complete the Form</a></li>
<li><a id="one3" href="#" style="color:black;" onclick="setColorById('one3','green');return false;">Thank the Customer</a></li>
</ul>
</ul>
</p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Account Details" columns="2">
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li><a id="two1" href="#" style="color:black;" onclick="setColorById('two1','green');return false;">Review All Account Details</a></li>
<li><a id="two2" href="#" style="color:black;" onclick="setColorById('two2','green');return false;">Verify Current Listed Contacts</a></li>
<li><a id="two3" href="#" style="color:black;" onclick="setColorById('two3','green');return false;">Add New Contacts (bottom of page)</a></li>
</ul>
</p>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.Phone}"/>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Website}"/>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.How_Many_Total_Wired_Players__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Wireless_Players__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Displays__c}"/>
<apex:inputField value="{!Account.How_Many_Additional_Digital_Suites__c"/>
<apex:inputField value="{!Account.How_Many_Total_Mounts__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Splitters__c}"/>
<apex:inputField value="{!Account.Length_between_Displays_for_splitters__c}"/>
<apex:inputField value="{!Account.Location_of_Player_in_School__c}"/>
<apex:inputField value="{!Account.Make_Model_Retrofitted_Displays__c}"/>
<apex:inputField value="{!Account.Menu_Planning_Software_Currently_Used__c}"/>
<apex:inputField value="{!Account.Make_Model_Retrofitted_Displays__c}"/>
<apex:inputField value="{!Account.Do_They_Have_Different_Serving_Lines__c}"/>
<apex:inputField value="{!Account.Serving_Lines_per_Player__c}"/>
<apex:inputField value="{!Account.Serving_Line_Name_s__c}"/>
<apex:inputField value="{!Account.Cycle__c}"/>
<apex:inputField value="{!Account.Cycle_Week__c}"/>
<apex:inputField value="{!Account.C Customer_Confirmed_Installation_Date__c}"/>
<apex:inputField value="{!Account.C Customer_Desired_Launch_Date__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contact Information" columns="2">
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li><a id="three1" href="#" style="color:black;" onclick="setColorById('three1','green');return false;">Confirm Maintenance Contact</a></li>
<li><a id="three2" href="#" style="color:black;" onclick="setColorById('three2','green');return false;">Confirm IT Contact</a></li>
</ul>
</p>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Maintenance_Contact__c}"/>
<apex:inputField value="{!Account.IT_Contact__c}"/>
<apex:pageBlockSection title="Wrap-Up" columns="1">
<p class="paraCrunch">
Thank you so much for taking the time to meet with me today. We are so excited to get started and look forward to working with you. Are there any questions about the program that you have for me at this time?
</p>
<p class="paraCrunch">
Again, my name is <b>{!$User.FirstName}</b>, and if you have any questions, please contact me at <b>803-380-5538</b> . Or, you can email me at <b>{!$User.Email}</b>.
</p>
</apex:pageBlockSection>
</apex:pageBlock>
<span style="float:right">
<apex:commandButton action="{!save}" value="Save" />
<apex:commandLink onclick="return confirm('Are you sure you want to cancel? All changes will be lost!');" action="{!cancel}" value="cancel"/>
</span><br /><br />
</apex:form>
<br />
<apex:pageBlock title="Contacts">
<apex:form >
<apex:commandButton value="New Contact" onclick="window.open('/setup/ui/recordtypeselect.jsp?ent=Contact&retURL=%2F{!account.id}&save_new_url=%2F003%2Fe%3FretURL%3D%252F{!account.id}%26accid%3D{!account.id}');"/>
<apex:pageBlockTable title="Contacts" value="{!account.contacts}" var="item">
<apex:column >
<apex:outputLink value="/{!item.id}" target="_blank">{!item.name}</apex:outputLink>
</apex:column>
<apex:column value="{!item.Title}"/>
<apex:column value="{!item.Email}"/>
<apex:column value="{!item.Primary_Contact__c}"/>
<apex:column value="{!item.Authorized_User__c}"/>
<apex:column value="{!item.Inactive__c}"/>
</apex:pageBlockTable>
</apex:form>
</apex:pageBlock>
<script type="text/javascript">
function confirmCancel() {
return confirm('Are you sure you want to cancel? All changes will be lost!');
}
function addressCopy(b0, b1, b2, b3, s0, s1, s2, s3) {
// Copy billing fields to shipping fields
document.getElementById(s0).value = document.getElementById(b0).value;
document.getElementById(s1).value = document.getElementById(b1).value;
document.getElementById(s2).value = document.getElementById(b2).value;
document.getElementById(s3).value = document.getElementById(b3).value;
// No form submission
return false;
}
function setColorById(id,sColor) {
var elem;
if (document.getElementById) {
if (elem=document.getElementById(id)) {
if (elem.style) {
elem.style.color=sColor;
return 1; // success
}
}
}
return 0; // failure
}
</script>
</apex:page
I am new to APEX in regards to creating VF pages.
I keep getting errors on lines 118 and I can't seem to figure it out. Can someone help me please?
<apex:page tabStyle="Account" standardController="Account">
<style >
p {
font-size:16px;
}
.beenWorkingOut {
font-size:16px;
}
.paraCrunch {
margin-left:10%;
margin-right:10%;
}
a {
text-decoration:none;
}
</style>
<apex:pageBlock title="MealViewer Initial Call to Customer Checklist">
<apex:pageBlockSection title="Summary" columns="2">
<apex:outputField value="{!Account.Phone}"/>
<apex:outputField value="{!Account.Name}"/>
<apex:pageBlockSectionItem />
<apex:pageBlockSectionItem />
<apex:pageBlockSectionItem />
<apex:outputLink onClick="window.open('/{!account.id}')">(View Account)</apex:outputLink>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:form >
<span style="float:right">
<apex:commandButton action="{!save}" value="Save" />
<apex:commandLink onclick="return confirm('Are you sure you want to cancel? All changes will be lost!');" action="{!cancel}" value="cancel"/>
</span>
<br /><br /><br />
<span style="float:right; font-size:12px; color:grey;">version 1.0 - revised 2015.04.07</span>
<apex:pageBlock title="Details">
<apex:pageBlockSection title="Introduction and Product Review" columns="2">
<p class="paraCrunch">
My name is <b>{!$User.FirstName} {!$User.LastName}</b> and I'm going to be taking care of you as your Onboarding Specialist here at MealViewer! Do you have a few minutes?
</p>
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li>Product Summary</li>
<ul>
<li><a id="one1" href="#" style="color:black;" onclick="setColorById('one1','green');return false;">Ask the Questions</a></li>
<li><a id="one2" href="#" style="color:black;" onclick="setColorById('one2','green');return false;">Complete the Form</a></li>
<li><a id="one3" href="#" style="color:black;" onclick="setColorById('one3','green');return false;">Thank the Customer</a></li>
</ul>
</ul>
</p>
</apex:pageBlockSection>
<apex:pageBlockSection title="Account Details" columns="2">
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li><a id="two1" href="#" style="color:black;" onclick="setColorById('two1','green');return false;">Review All Account Details</a></li>
<li><a id="two2" href="#" style="color:black;" onclick="setColorById('two2','green');return false;">Verify Current Listed Contacts</a></li>
<li><a id="two3" href="#" style="color:black;" onclick="setColorById('two3','green');return false;">Add New Contacts (bottom of page)</a></li>
</ul>
</p>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.Phone}"/>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Website}"/>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.How_Many_Total_Wired_Players__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Wireless_Players__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Displays__c}"/>
<apex:inputField value="{!Account.How_Many_Additional_Digital_Suites__c"/>
<apex:inputField value="{!Account.How_Many_Total_Mounts__c}"/>
<apex:inputField value="{!Account.How_Many_Total_Splitters__c}"/>
<apex:inputField value="{!Account.Length_between_Displays_for_splitters__c}"/>
<apex:inputField value="{!Account.Location_of_Player_in_School__c}"/>
<apex:inputField value="{!Account.Make_Model_Retrofitted_Displays__c}"/>
<apex:inputField value="{!Account.Menu_Planning_Software_Currently_Used__c}"/>
<apex:inputField value="{!Account.Make_Model_Retrofitted_Displays__c}"/>
<apex:inputField value="{!Account.Do_They_Have_Different_Serving_Lines__c}"/>
<apex:inputField value="{!Account.Serving_Lines_per_Player__c}"/>
<apex:inputField value="{!Account.Serving_Line_Name_s__c}"/>
<apex:inputField value="{!Account.Cycle__c}"/>
<apex:inputField value="{!Account.Cycle_Week__c}"/>
<apex:inputField value="{!Account.C Customer_Confirmed_Installation_Date__c}"/>
<apex:inputField value="{!Account.C Customer_Desired_Launch_Date__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contact Information" columns="2">
<p class="paraCrunch">
<ul class="beenWorkingOut">
<li><a id="three1" href="#" style="color:black;" onclick="setColorById('three1','green');return false;">Confirm Maintenance Contact</a></li>
<li><a id="three2" href="#" style="color:black;" onclick="setColorById('three2','green');return false;">Confirm IT Contact</a></li>
</ul>
</p>
<apex:pageBlockSectionItem />
<apex:inputField value="{!Account.Maintenance_Contact__c}"/>
<apex:inputField value="{!Account.IT_Contact__c}"/>
<apex:pageBlockSection title="Wrap-Up" columns="1">
<p class="paraCrunch">
Thank you so much for taking the time to meet with me today. We are so excited to get started and look forward to working with you. Are there any questions about the program that you have for me at this time?
</p>
<p class="paraCrunch">
Again, my name is <b>{!$User.FirstName}</b>, and if you have any questions, please contact me at <b>803-380-5538</b> . Or, you can email me at <b>{!$User.Email}</b>.
</p>
</apex:pageBlockSection>
</apex:pageBlock>
<span style="float:right">
<apex:commandButton action="{!save}" value="Save" />
<apex:commandLink onclick="return confirm('Are you sure you want to cancel? All changes will be lost!');" action="{!cancel}" value="cancel"/>
</span><br /><br />
</apex:form>
<br />
<apex:pageBlock title="Contacts">
<apex:form >
<apex:commandButton value="New Contact" onclick="window.open('/setup/ui/recordtypeselect.jsp?ent=Contact&retURL=%2F{!account.id}&save_new_url=%2F003%2Fe%3FretURL%3D%252F{!account.id}%26accid%3D{!account.id}');"/>
<apex:pageBlockTable title="Contacts" value="{!account.contacts}" var="item">
<apex:column >
<apex:outputLink value="/{!item.id}" target="_blank">{!item.name}</apex:outputLink>
</apex:column>
<apex:column value="{!item.Title}"/>
<apex:column value="{!item.Email}"/>
<apex:column value="{!item.Primary_Contact__c}"/>
<apex:column value="{!item.Authorized_User__c}"/>
<apex:column value="{!item.Inactive__c}"/>
</apex:pageBlockTable>
</apex:form>
</apex:pageBlock>
<script type="text/javascript">
function confirmCancel() {
return confirm('Are you sure you want to cancel? All changes will be lost!');
}
function addressCopy(b0, b1, b2, b3, s0, s1, s2, s3) {
// Copy billing fields to shipping fields
document.getElementById(s0).value = document.getElementById(b0).value;
document.getElementById(s1).value = document.getElementById(b1).value;
document.getElementById(s2).value = document.getElementById(b2).value;
document.getElementById(s3).value = document.getElementById(b3).value;
// No form submission
return false;
}
function setColorById(id,sColor) {
var elem;
if (document.getElementById) {
if (elem=document.getElementById(id)) {
if (elem.style) {
elem.style.color=sColor;
return 1; // success
}
}
}
return 0; // failure
}
</script>
</apex:page
All Answers