• Jeff_SF
  • NEWBIE
  • 60 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 18
    Replies
We have a dozen or so visual force pages needing updated code to compatibility with the current API version.  Please let me know if you are interested.  Thank you
The page opens fine up through API version 28.  With versin 29, this message comes up when trying to open a record:

'NotesAndAttachments' is not a valid child relationship name for entity Inspection
<apex:page standardController="Inspection__c" showHeader="true"> <style> .activeTab { background-color: white; color: #319431; background-image: none } .inactiveTab { background-color: lightgrey; color: black; background-image: none } </style> <apex:form > <apex:sectionHeader title="Inspection Form" subtitle="{!Inspection__c.name}" description="" printUrl="/apex/Inspection_Form_PDF?id={!Inspection__c.id}" /> <apex:pageMessages /> <apex:pageBlock title="" mode="detail"> <apex:pageBlockSection columns="2" id="biGrid" showHeader="false"> <apex:outputField value="{!Inspection__c.name}" id="inspection_name" /> <apex:outputField value="{!Inspection__c.Date__c}" id="inspection_date" /> <apex:outputField value="{!Inspection__c.Customer__c}" id="customer" /> <apex:outputField value="{!Inspection__c.Tenant__c}" id="tenant" /> <apex:outputField value="{!Inspection__c.Contact__c}" id="contact" /> <apex:outputField value="{!Inspection__c.Performed_By__c}" id="performedby" /> <apex:outputField value="{!Inspection__c.Cleaner__c}" id="cleaner" /> <apex:outputField value="{!Inspection__c.Case_Recommended__c}" id="recommended" /> <apex:outputField value="{!Inspection__c.Contact_Made__c}" id="contactMade" /> <apex:outputField value="{!Inspection__c.Create_Case__c}" id="Create_Case" /> <apex:outputField value="{!Inspection__c.Review__c}" id="review" /> <apex:outputPanel rendered="{!IF((Inspection__c.Date__c < DATEVALUE('2010-05-01')) && ISBLANK(Inspection__c.Contact__c),'TRUE','FALSE')}" /> <apex:outputField value="{!Inspection__c.Contact_Name__c}" id="contactName" rendered="{!IF((Inspection__c.Date__c < DATEVALUE('2010-05-01')) && ISBLANK(Inspection__c.Contact__c),'TRUE','FALSE')}" /> </apex:pageBlockSection> <apex:pageBlockSection title="{!$ObjectType.Inspection__c.fields.Inspection_Score__c.label} {!Inspection__c.Inspection_Score__c}%" columns="2" id="ScoresPageBlock" collapsible="true"> <!-- <apex:outputField value="{!Inspection__c.Inspection_Score__c}" /> --> <apex:outputField value="{!Inspection__c.CustomerSatisfactionScore__c}" /> <apex:outputField value="{!Inspection__c.ResilientFloorAreaScore__c}" /> <apex:outputField value="{!Inspection__c.EntranceAreaScore__c}" /> <apex:outputField value="{!Inspection__c.BreakroomScore__c}" /> <apex:outputField value="{!Inspection__c.DustingScore__c}" /> <apex:outputField value="{!Inspection__c.TrashScore__c}" /> <apex:outputField value="{!Inspection__c.RestroomExamScore__c}" /> <apex:outputField value="{!Inspection__c.GeneralMiscScore__c}" /> <apex:outputField value="{!Inspection__c.CarpetedAreaScore__c}" /> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock title="Inspection Detail" mode="detail" id="inspectionDetail"> <apex:pageBlockButtons location="top"> <apex:commandButton action="{!edit}" value="Edit" /> <apex:commandButton action="{!cancel}" value="Cancel" /> <apex:commandButton action="{!delete}" value="Delete" rendered="{!OR($Profile.Name == 'System Administrator', $Profile.Name == 'General Manager')}" /> </apex:pageBlockButtons> <apex:tabPanel switchType="client" selectedTab="CSTab" id="InspectionTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" headerSpacing="0px"> <apex:tab label="Customer Satisfation" name="CSTab" id="tabCS"> <apex:pageBlockSection columns="2" id="CSPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.CS__c.label}" for="E01" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.CS__c}" id="CS"> <apex:selectOption itemValue="1.0" itemLabel="Dissatisfied" /> <apex:selectOption itemValue="2.0" itemLabel="Neutral" /> <apex:selectOption itemValue="3.0" itemLabel="Will Refer" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:tab> <apex:tab label="Entrance Areas" name="EATab" id="tabEA"> <apex:pageBlockSection columns="2" id="EAPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.E01__c.label}" for="E01" style="font-weight:bold;" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.E01__c}" id="E01"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.E01W__c}" style="width:30px" id="E01W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.E02__c.label}" for="E02" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.E02__c}" id="E02"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.E02W__c}" style="width:30px" id="E02W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.E03__c.label}" for="E03" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.E03__c}" id="E03"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.E03W__c}" style="width:30px" id="E03W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.E04__c.label}" for="E04" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.E04__c}" id="E04"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.E04W__c}" style="width:30px" id="E04W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.E05__c.label}" for="E05" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.E05__c}" id="E05"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.E05W__c}" style="width:30px" id="E05W" /> </apex:pageBlockSection> </apex:tab> <apex:tab label="Dusting" name="DTab" id="tabD"> <apex:pageBlockSection columns="2" id="DPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D01__c.label}" for="D01" style="font-weight:bold;" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D01__c}" id="D01"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D01W__c}" style="width:30px" id="D01W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D02__c.label}" for="D02" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D02__c}" id="D02"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D02W__c}" style="width:30px" id="D02W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D04__c.label}" for="D04" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D04__c}" id="D04"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D04W__c}" style="width:30px" id="D04W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D05__c.label}" for="D05" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D05__c}" id="D05"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D05W__c}" style="width:30px" id="D05W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D12__c.label}" for="D12" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D12__c}" id="D12"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D12W__c}" style="width:30px" id="D12W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D06__c.label}" for="D06" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D06__c}" id="D06"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D06W__c}" style="width:30px" id="D06W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D07__c.label}" for="D07" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D07__c}" id="D07"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D07W__c}" style="width:30px" id="D07W" /> </apex:pageBlockSection> </apex:tab> <apex:tab label="Dusting (High & Low)" name="DHLTab" id="tabDHL"> <apex:pageBlockSection columns="2" id="DHLPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D08__c.label}" for="D08" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D08__c}" id="D08"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D08W__c}" style="width:30px" id="D08W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D09__c.label}" for="D09" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D09__c}" id="D09"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D09W__c}" style="width:30px" id="D09W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.D11__c.label}" for="D11" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.D11__c}" id="D11"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.D11W__c}" style="width:30px" id="D11W" /> </apex:pageBlockSection> </apex:tab> <apex:tab label="Restrooms & Exams Rooms" name="RETab" id="tabRE"> <apex:pageBlockSection columns="2" id="REPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE01__c.label}" for="RE01" style="font-weight:bold;" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE01__c}" id="RE01"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE01W__c}" style="width:30px" id="RE01W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE02__c.label}" for="RE02" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE02__c}" id="RE02"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE02W__c}" style="width:30px" id="RE02W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE03__c.label}" for="RE03" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE03__c}" id="RE03"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE03W__c}" style="width:30px" id="RE03W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE04__c.label}" for="RE04" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE04__c}" id="RE04"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE04W__c}" style="width:30px" id="RE04W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE05__c.label}" for="RE05" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE05__c}" id="RE05"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE05W__c}" style="width:30px" id="RE05W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE06__c.label}" for="RE06" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE06__c}" id="RE06"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE06W__c}" style="width:30px" id="RE06W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE07__c.label}" for="RE07" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE07__c}" id="RE07"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE07W__c}" style="width:30px" id="RE07W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE08__c.label}" for="RE08" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE08__c}" id="RE08"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE08W__c}" style="width:30px" id="RE08W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE09__c.label}" for="RE09" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE09__c}" id="RE09"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE09W__c}" style="width:30px" id="RE09W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.RE10__c.label}" for="RE10" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.RE10__c}" id="RE10"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.RE10W__c}" style="width:30px" id="RE10W" /> </apex:pageBlockSection> </apex:tab> <apex:tab label="Carpeted Areas" name="CTab" id="tabC"> <apex:pageBlockSection columns="2" id="CPageBlock"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.C01__c.label}" for="C01" style="font-weight:bold;" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.C01__c}" id="C01"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.C01W__c}" style="width:30px" id="C01W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.C02__c.label}" for="C02" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" value="{!Inspection__c.C02__c}" id="C02"> <apex:selectOption itemValue="1.0" itemLabel="Urgent" /> <apex:selectOption itemValue="2.0" itemLabel="Needs Improvement" /> <apex:selectOption itemValue="3.0" itemLabel="Meets Standards" /> <apex:selectOption itemValue="0.0" itemLabel="N/A" /> </apex:selectRadio> </apex:pageBlockSectionItem> <apex:outputField value="{!Inspection__c.C02W__c}" style="width:30px" id="C02W" /> <apex:pageBlockSectionItem > <apex:outputLabel value="{!$ObjectType.Inspection__c.fields.C03__c.label}" for="C03" style="font-weight:bold" /> <apex:selectRadio readonly="true" disabled="true" 



 
Am upgrading the API for a VF page and getting an error:
Error: Special_Considerations_PDF line 51, column 42: The element type "br" must be terminated by the matching end-tag "</br>"
Error: The element type "br" must be terminated by the matching end-tag "</br>".

here is the line 51 referenced in the error :

<tr><td>Paper Supply<br>Order Protocol:</td><td><apex:outputText value="{!account.Supply_Status__c}"/></td></tr>

Where does this matching end tag need to go?  Is there a sample page availble ithat would be helpful?
Thank you:
 
I am getting the above error when running a lfow attempting to update a coule hundred records.  The flow runs OK with one record by completing a fast update using a loop.  It fails when the 200 records are updated.  Any suggestions?

thanks
  • September 28, 2017
  • Like
  • 0
AM having some issues deploying a small change for a trigger and adding a new trigger.  I am getting only19% coverage even though a previous developer has written a test class for all triggers a few years ago.  The api version for most triggers and testclass is 18.0.  the new trigger is api version 39.  could this have anything to do with why the coverage is so low?  What would be the best way to remedy this issue.?  Thank you
The same error is not happening in sandbox.  I am atempting to add a trigger and update another.  this same erro is happening on several failed tests.  I am not able to deploy for this reason.

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_USERNAME, Duplicate Username.<br>The username already exists in this or another Salesforce organization. Usernames must be unique across all Salesforce organizations. To resolve, use a different username (it doesn't need to match the user's email address). : [Username]
I am getting the above error when running a flow to update records In an object.  The same object has a trigger that updates whenever a record is udated.  Is there a work around for this limit issue in this particular instance? I have a couple of flows that will need to update records on this object but the trigger is getting in the way.  thank you
trigger ServiceBillingsTrigger on Service_Billings__c (after delete, after insert, after update) {
 
  Map<String,Special_Services_Sched__c> spcMap = new Map<String,Special_Services_Sched__c>();
  List<Special_Services_Sched__c> spcList = new List<Special_Services_Sched__c>();

  Map<String,Account> acctMap = new Map<String,Account>();
  List<Account> acctList = new List<Account>();
  
  final Product2 prod = [Select Id, Name From Product2 Where RecordTypeId = '012A0000000IqewIAC' And Name = 'JC' LIMIT 1][0];
  final RecordType inSpecsRt = [Select Id From RecordType WHERE SobjectType='Special_Services_Sched__c' AND Name='Specs' LIMIT 1];
  
  if (trigger.isDelete)
  {
      for (Service_Billings__c s : trigger.old) 
      {
      if(s.Cleaner__c != null)
      {
        if(!acctMap.containsKey(s.Cleaner__c))
        {
          Account clnrAcct = new Account(Id=s.Cleaner__c);
          clnrAcct.Active_Service__c = [Select count() 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Cleaner__c=:s.Cleaner__c];
          AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Cleaner__c=:s.Cleaner__c];
          clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

          acctMap.put(s.Cleaner__c,clnrAcct);
        }
      }

      if(s.Customer__c != null)
      {
        if(!acctMap.containsKey(s.Customer__c))
        {
          Account custAcct = new Account(Id=s.Customer__c);
          custAcct.Active_Service__c = [Select count() 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Customer__c=:s.Customer__c];
          AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Customer__c=:s.Customer__c];
          custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

          acctMap.put(s.Customer__c,custAcct);
        }
        if(s.Active__c)
        {
          if(s.Service__c == prod.Id)
          {
            for(Special_Services_Sched__c spc : [Select Id 
                                From Special_Services_Sched__c 
                                Where Active__c=true 
                                  And RecordTypeId =:inSpecsRt.Id
                                  And Customer__c=:s.Customer__c])
            {
              if(spcMap.containsKey(spc.Id))
                spcMap.remove(spc.Id);
              spc.Service_Billing__c = s.Id;
              spcMap.put(spc.Id,spc);
            }
          }
        }
      } 
      }    
  } else {

    if(Trigger.isUpdate)
    {
      for(integer x = 0; x < trigger.old.size(); x++)
          {
            if(trigger.old[x].LastBilled__c != trigger.new[x].LastBilled__c)
            {
              // billing Cycle Ignore Request.
            } else {
              Service_Billings__c s = trigger.new[x];
          if(s.Cleaner__c != null)
          {
            if(!acctMap.containsKey(s.Cleaner__c))
            {
              Account clnrAcct = new Account(Id=s.Cleaner__c);
              clnrAcct.Active_Service__c = [Select count() 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Cleaner__c=:s.Cleaner__c];
              AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Cleaner__c=:s.Cleaner__c];
              clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
              
              acctMap.put(s.Cleaner__c,clnrAcct);
            }
          }
    
          if(s.Customer__c != null)
          {
            if(!acctMap.containsKey(s.Customer__c))
            {
              Account custAcct = new Account(Id=s.Customer__c);
              custAcct.Active_Service__c = [Select count() 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Customer__c=:s.Customer__c];
              AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Customer__c=:s.Customer__c];
              custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
              acctMap.put(s.Customer__c,custAcct);
            }    
            if(s.Active__c)
            {
              if(s.Service__c == prod.Id)
              {
                for(Special_Services_Sched__c spc : [Select Id 
                                    From Special_Services_Sched__c 
                                    Where Active__c=true 
                                      And RecordTypeId =:inSpecsRt.Id
                                      And Customer__c=:s.Customer__c])
                {
                  if(spcMap.containsKey(spc.Id))
                    spcMap.remove(spc.Id);
                  spc.Service_Billing__c = s.Id;
                  spcMap.put(spc.Id,spc);
                }
              }
            }
          } 
        }
          }
    }

    if(Trigger.isInsert)
    {    
        for (Service_Billings__c s : trigger.new) 
        {
        if(s.Cleaner__c != null)
        {
          if(!acctMap.containsKey(s.Cleaner__c))
          {
            Account clnrAcct = new Account(Id=s.Cleaner__c);
            clnrAcct.Active_Service__c = [Select count() 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Cleaner__c=:s.Cleaner__c];
  
            AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Cleaner__c=:s.Cleaner__c];
            clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

            acctMap.put(s.Cleaner__c,clnrAcct);
          }
        }
  
        if(s.Customer__c != null)
        {
          if(!acctMap.containsKey(s.Customer__c))
          {
            Account custAcct = new Account(Id=s.Customer__c);
            custAcct.Active_Service__c = [Select count() 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Customer__c=:s.Customer__c];
            AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Customer__c=:s.Customer__c];
            custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
            acctMap.put(s.Customer__c,custAcct);
          }  
          if(s.Active__c)
          {
            if(s.Service__c == prod.Id)
            {
              for(Special_Services_Sched__c spc : [Select Id 
                                  From Special_Services_Sched__c 
                                  Where Active__c=true 
                                    And RecordTypeId =:inSpecsRt.Id
                                    And Customer__c=:s.Customer__c])
              {
                if(spcMap.containsKey(spc.Id))
                  spcMap.remove(spc.Id);
                spc.Service_Billing__c = s.Id;
                spcMap.put(spc.Id,spc);
              }
            }
          }
        } 
        }
    }
    }
   
     if(!acctMap.isEmpty())
       acctList.addAll(acctMap.values());
    if(acctList.size() > 0)
      update(acctList);
      
    if(!spcMap.isEmpty())
      spcList.addAll(spcMap.values());
  if(spcList.size() > 0)
    update(spcList);
}

 
i am getting an error that is in code. line 287 is the very last line of code.  Any suggestions?
 
<apex:page standardController="Opportunity" renderAs="pdf" sidebar="false" title="Opportunity Quotation">
<apex:composition template="PDF_Header_Template">
    <apex:define name="extraStyle">
<style type="text/css">
.style4 {
    color: #000000;
    font-size: 14px;
    font-weight: bold;
}
#PreparedBy {
    position: absolute;
    width: 77%;
    height: 60px;
    left: 30px;
    top: 145px;
    border: 0px red solid;
}
.ShipAndBillSection {
    position: absolute;
    width: 99%;
    height: 90px;
    left: 5px;
    top: 215px;
    border: 0px blue solid;
}
.ShipAndBill {
    width: 340px;
    height: 90px;
    border: 1px silver solid;
    vertical-align: top;
}
.billToShipToLabel {
    font-size: 12px;
    width: 110px;
    height: 100%;
    vertical-align: top;
}
.addr {
    font-size: 12px;
    width: 450px;
    vertical-align: top;
}
.LineItems {
    position: absolute;
    left: 5px;
    height: 300px;
    top: 330px;
    z-index: 1;
    width: 99%;
    border: 0px green solid;
}
.LineItemsTable {
    width: 100%;
    height: 100%;
    border-top: 0px;
}
.LineItemHeader {
    background-color: gray;
    border: 1px gray solid;
    text-align: right;
}
.TotalColHeader {
    background-color: gray;
    border: 0px gray solid;
    text-align: right;
}
.TotalColRow {
    background-color: silver;
    border-right: 0px silver solid;
    text-align: right;
}
.LineItemCell {
    border-right: 1px silver solid;
    background-color: white;
    text-align: right;
}
#commentBox {
    position: relative;
    left: 100px;
    top: 10px;
    width: 80%;
}
#bottomSection {
    position: absolute;
    top: 770px;
    left: 130px;
    width: 450px;
    border: 0px aqua solid;
}
#ApprovalBlock {
    position: relative;
    left: 0px;
    top: 10px;
    width: 450px;
    border: 0px purple solid;
}
.approvalTable {
    width:100%;
    height:105px;
    border: 0px lime solid;
}
</style>
    </apex:define>
    <apex:define name="PageTitle">{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'WAGE ADJUSTMENT','QUOTATION')}</apex:define>
    <apex:define name="titleBoxInfo">
        <span class="style4"># {!Opportunity.Opportunity_Number__c}</span> <br />
        DATE:&nbsp;&nbsp; <apex:outputText value="{0,date,MM/dd/yyyy}"><apex:param value="{!Opportunity.CreatedDate}" /></apex:outputText>
        <br style="line-height:1.3;" />
        <apex:outputText value="VALID UNTIL: {0,date,MM/dd/yyyy}" rendered="{!IF(OR(ISBLANK(Opportunity.Valid_Until__c),ISNULL(Opportunity.Valid_Until__c)),'FALSE','TRUE')}"><apex:param value="{!Opportunity.Valid_Until__c}" /></apex:outputText>
    </apex:define>
</apex:composition>

<div id="PreparedBy">
    <table cellpadding="2" cellspacing="0" width="100%" border="0">
        <tr>
            <td style="width: 75px">Prepared By</td>
            <td colspan="2">{!$User.FirstName & " " & $User.LastName}</td>
        </tr>
        <tr>
            <td>Phone</td>
            <td colspan="2">{!$User.Phone}</td>
        </tr>
        <tr>
            <td>Email</td>
            <td>{!$User.Email}</td>
            <td style="width:300px;text-align:right;">Customer # {!Opportunity.Account.QB_Account_Number__c}</td>
        </tr>
    </table>
</div>
<div id="ShipAndBillSection" class="ShipAndBillSection">
    <table style="width:100%;height:100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td>
            <table cellpadding="0" cellspacing="0" class="ShipAndBill">
                <tr>
                    <td>
                    <table style="width:100%;height:100%;" cellpadding="1" cellspacing="1">
                        <tr>
                            <td rowspan="3" class="billToShipToLabel">BILL TO:</td>
                            <td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.Name,Opportunity.Account.Name)}</td>
                        </tr>
                        <tr><td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingStreet,Opportunity.Account.BillingStreet)}</td></tr>
                        <tr><td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingCity,Opportunity.Account.BillingCity)}, 
                                             {!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingState,Opportunity.Account.BillingState)} 
                                             {!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingPostalCode,Opportunity.Account.BillingPostalCode)}
                            </td>
                        </tr>
                    </table>
                    </td>
                </tr>
            </table>
            </td>
            <td style="width: 30px;">&nbsp;</td>
            <td>
            <table cellpadding="0" cellspacing="0" class="ShipAndBill">
                <tr>
                    <td style="vertical-align: top;">
                    <table style="width:100%;height:100%;" cellpadding="1" cellspacing="1">
                        <tr>
                            <td rowspan="5" class="billToShipToLabel">SERVICE AT:</td>
                            <td class="addr">{!Opportunity.Account.Name}</td>
                        </tr>
                        <tr><td class="addr">{!Opportunity.Account.ShippingStreet}</td></tr>
                        <tr><td class="addr">{!Opportunity.Account.ShippingCity}, 
                                             {!Opportunity.Account.ShippingState} 
                                             {!Opportunity.Account.ShippingPostalCode}</td></tr>
                        <tr><td class="addr">{!Opportunity.Account.Phone}</td></tr>
                    </table>
                    </td>
                </tr>
            </table>
            </td>
        </tr>
    </table>
</div>
    <c:OpportunitySortedItems value="{!Opportunity}" />
<!-- 
<apex:outputPanel layout="block" styleClass="LineItems" rendered="{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'FALSE','TRUE')}">
    <table class="LineItemsTable" cellpadding="5" cellspacing="0">
        <thead>
            <tr class="LineItemHeader">
                <td style="text-align:left;width:15%;">Product Name</td>
                <td style="text-align:left;width:40%;">Description</td>
                <td style="width:15%;">Sales Price</td>
                <td style="width:15%;">Quantity</td>
                <td style="width:15%;" class="TotalColHeader">Total Price</td>
            </tr>
        </thead>
        <apex:repeat var="line" value="{!Opportunity.OpportunityLineItems}" >
                <tr>
                    <td class="LineItemCell" style="text-align:center;border-bottom:1px silver solid;border-left:1px silver solid;">{!line.PricebookEntry.Name}</td>
                    <td class="LineItemCell" style="text-align:left;border-bottom:1px silver solid;">{!line.Description}</td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.UnitPrice}" />
                        </apex:outputText>
                    </td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, #,###.00}">
                          <apex:param value="{!line.Quantity}" />
                        </apex:outputText>
                    </td>
                    <td class="TotalColRow" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.TotalPrice}" />
                        </apex:outputText>
                    </td>
                </tr>
        </apex:repeat>
    <tr><td height="50px" colspan="3" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;">&nbsp;</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;" >Grand Total</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">
            <apex:outputText value="{0, number, $###,###.00}">
                <apex:param value="{!Opportunity.Amount}" />
            </apex:outputText>
        </td>
    </tr>
    <tr><td colspan="5" align="left" style="padding: 10px 50px 5px 50px;"><div id="commentBox2">{!Opportunity.Quote_Comments__c}</div></td></tr>
</table>
</apex:outputPanel>
<apex:outputPanel layout="block" styleClass="LineItems" rendered="{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'TRUE','FALSE')}">
 <table class="LineItemsTable" cellpadding="5" cellspacing="0">
        <thead>
            <tr class="LineItemHeader">
                <td style="text-align:left;width:5%;">Service</td>
                <td style="text-align:left;width:65%;">Description</td>
                <td style="width:15%;">Sales Price</td>
                <td style="width:15%;"class="TotalColHeader">Total Price</td>
            </tr>
        </thead>
        <apex:repeat var="line" value="{!Opportunity.OpportunityLineItems}" >
                <tr>
                    <td class="LineItemCell" style="text-align:center;border-bottom:1px silver solid;border-left:1px silver solid;">{!line.PricebookEntry.Name}</td>
                    <td class="LineItemCell" style="text-align:left;border-bottom:1px silver solid;">{!line.Description}</td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.UnitPrice}" />
                        </apex:outputText>
                    </td>
                    <td class="TotalColRow" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.TotalPrice}" />
                        </apex:outputText>
                    </td>
                </tr>
        </apex:repeat>
    <tr><td height="50px" colspan="2" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;">&nbsp;</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="2" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;" >Grand Total</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">
            <apex:outputText value="{0, number, $###,###.00}">
                <apex:param value="{!Opportunity.Amount}" />
            </apex:outputText>
        </td>
    </tr>
    <tr><td colspan="5" align="left" style="padding: 10px 50px 5px 50px;"><div id="commentBox2">{!Opportunity.Quote_Comments__c}</div></td></tr>
</table>
    <div id="commentBox">
    <apex:outputPanel rendered="{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'TRUE','FALSE')}">    
        <br /><br />When signed this Quote will serve as an addendum to the original service agreement and will change the monthly billing to the above stated amount.
    </apex:outputPanel>
    </div>
</apex:outputPanel>
-->
<div id="bottomSection">
    <div id="ReturnMsg" class="rtnMsg">
    The prices, specifications and conditions are satisfactory and are hereby accepted. 
    Square Feat, Inc. is authorized to do these items as specified.  Please line out 
    and initial any line items not needed.</div>
    <div id="ApprovalBlock">
        <table class="approvalTable" cellpadding="0" cellspacing="0">
            <tr><td style="width:75px;">Approved&nbsp;By</td><td style="width:375px;height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr><td>Date</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr><td>Signature</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr style="display:{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'visible','none')}">
            <td>{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'Effective Date','')}{!IF(contains(Opportunity.RecordType.Name,'Special Service'),'Preferred Service Date','')}</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
        </table>
    </div>
    <div style="align:center;">PLEASE FAX OR EMAIL BACK APPROVED {!IF(contains(Opportunity.RecordType.Name,'Addendum'),'ADDENDUM','QUOTE')} TO SCHEDULE WORK.</div>
    <br />
    <div style="align:center;font-weight:bold;">Thank you for the opportunity! Visit us on our web site at www.squarefeat.com</div>
</div>
</body>
</apex:page>

 
I would like to display the standard system info on a VF form.  What is the proper format to use for code that will show the created by name and time and last modified by name and time .  thank you
I would like to display the standard system info on a VF form.  What is the format to use for code that will show the created by name and time and last modified by name and time .  thank you
How can a default value be set in a VF page in a long text feild? Currently the default value set in the object feild for comments__c does not populate when the record is entered from the VF page.
 </apex:tab>
                <apex:tab label="Comments" name="CommentsTab" id="tabComments">
                    <apex:pageBlockSection columns="1" id="CommentsPageBlock">
                        <apex:outputField value="{!Inspection__c.Comments__c}" id="Comments" />
                    </apex:pageBlockSection>
                </apex:tab>
 

Would like to have text formula function to convert a currency field in a salesforce object to another field in  Written English.  For example $100.00 to "One hundred dollars and zero cents".  It would be similar to this Microsoft code:

 

Number to Words/Text

 

Thanks

Jeff

We have a dozen or so visual force pages needing updated code to compatibility with the current API version.  Please let me know if you are interested.  Thank you
Am upgrading the API for a VF page and getting an error:
Error: Special_Considerations_PDF line 51, column 42: The element type "br" must be terminated by the matching end-tag "</br>"
Error: The element type "br" must be terminated by the matching end-tag "</br>".

here is the line 51 referenced in the error :

<tr><td>Paper Supply<br>Order Protocol:</td><td><apex:outputText value="{!account.Supply_Status__c}"/></td></tr>

Where does this matching end tag need to go?  Is there a sample page availble ithat would be helpful?
Thank you:
 
The same error is not happening in sandbox.  I am atempting to add a trigger and update another.  this same erro is happening on several failed tests.  I am not able to deploy for this reason.

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_USERNAME, Duplicate Username.<br>The username already exists in this or another Salesforce organization. Usernames must be unique across all Salesforce organizations. To resolve, use a different username (it doesn't need to match the user's email address). : [Username]
I am getting the above error when running a flow to update records In an object.  The same object has a trigger that updates whenever a record is udated.  Is there a work around for this limit issue in this particular instance? I have a couple of flows that will need to update records on this object but the trigger is getting in the way.  thank you
trigger ServiceBillingsTrigger on Service_Billings__c (after delete, after insert, after update) {
 
  Map<String,Special_Services_Sched__c> spcMap = new Map<String,Special_Services_Sched__c>();
  List<Special_Services_Sched__c> spcList = new List<Special_Services_Sched__c>();

  Map<String,Account> acctMap = new Map<String,Account>();
  List<Account> acctList = new List<Account>();
  
  final Product2 prod = [Select Id, Name From Product2 Where RecordTypeId = '012A0000000IqewIAC' And Name = 'JC' LIMIT 1][0];
  final RecordType inSpecsRt = [Select Id From RecordType WHERE SobjectType='Special_Services_Sched__c' AND Name='Specs' LIMIT 1];
  
  if (trigger.isDelete)
  {
      for (Service_Billings__c s : trigger.old) 
      {
      if(s.Cleaner__c != null)
      {
        if(!acctMap.containsKey(s.Cleaner__c))
        {
          Account clnrAcct = new Account(Id=s.Cleaner__c);
          clnrAcct.Active_Service__c = [Select count() 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Cleaner__c=:s.Cleaner__c];
          AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Cleaner__c=:s.Cleaner__c];
          clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

          acctMap.put(s.Cleaner__c,clnrAcct);
        }
      }

      if(s.Customer__c != null)
      {
        if(!acctMap.containsKey(s.Customer__c))
        {
          Account custAcct = new Account(Id=s.Customer__c);
          custAcct.Active_Service__c = [Select count() 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Customer__c=:s.Customer__c];
          AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                          From Service_Billings__c 
                          Where Active__c=true 
                          And Customer__c=:s.Customer__c];
          custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

          acctMap.put(s.Customer__c,custAcct);
        }
        if(s.Active__c)
        {
          if(s.Service__c == prod.Id)
          {
            for(Special_Services_Sched__c spc : [Select Id 
                                From Special_Services_Sched__c 
                                Where Active__c=true 
                                  And RecordTypeId =:inSpecsRt.Id
                                  And Customer__c=:s.Customer__c])
            {
              if(spcMap.containsKey(spc.Id))
                spcMap.remove(spc.Id);
              spc.Service_Billing__c = s.Id;
              spcMap.put(spc.Id,spc);
            }
          }
        }
      } 
      }    
  } else {

    if(Trigger.isUpdate)
    {
      for(integer x = 0; x < trigger.old.size(); x++)
          {
            if(trigger.old[x].LastBilled__c != trigger.new[x].LastBilled__c)
            {
              // billing Cycle Ignore Request.
            } else {
              Service_Billings__c s = trigger.new[x];
          if(s.Cleaner__c != null)
          {
            if(!acctMap.containsKey(s.Cleaner__c))
            {
              Account clnrAcct = new Account(Id=s.Cleaner__c);
              clnrAcct.Active_Service__c = [Select count() 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Cleaner__c=:s.Cleaner__c];
              AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Cleaner__c=:s.Cleaner__c];
              clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
              
              acctMap.put(s.Cleaner__c,clnrAcct);
            }
          }
    
          if(s.Customer__c != null)
          {
            if(!acctMap.containsKey(s.Customer__c))
            {
              Account custAcct = new Account(Id=s.Customer__c);
              custAcct.Active_Service__c = [Select count() 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Customer__c=:s.Customer__c];
              AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                              From Service_Billings__c 
                              Where Active__c=true 
                              And Customer__c=:s.Customer__c];
              custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
              acctMap.put(s.Customer__c,custAcct);
            }    
            if(s.Active__c)
            {
              if(s.Service__c == prod.Id)
              {
                for(Special_Services_Sched__c spc : [Select Id 
                                    From Special_Services_Sched__c 
                                    Where Active__c=true 
                                      And RecordTypeId =:inSpecsRt.Id
                                      And Customer__c=:s.Customer__c])
                {
                  if(spcMap.containsKey(spc.Id))
                    spcMap.remove(spc.Id);
                  spc.Service_Billing__c = s.Id;
                  spcMap.put(spc.Id,spc);
                }
              }
            }
          } 
        }
          }
    }

    if(Trigger.isInsert)
    {    
        for (Service_Billings__c s : trigger.new) 
        {
        if(s.Cleaner__c != null)
        {
          if(!acctMap.containsKey(s.Cleaner__c))
          {
            Account clnrAcct = new Account(Id=s.Cleaner__c);
            clnrAcct.Active_Service__c = [Select count() 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Cleaner__c=:s.Cleaner__c];
  
            AggregateResult[] groupedResults = [Select SUM(Cleaner_Price__c) 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Cleaner__c=:s.Cleaner__c];
            clnrAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));

            acctMap.put(s.Cleaner__c,clnrAcct);
          }
        }
  
        if(s.Customer__c != null)
        {
          if(!acctMap.containsKey(s.Customer__c))
          {
            Account custAcct = new Account(Id=s.Customer__c);
            custAcct.Active_Service__c = [Select count() 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Customer__c=:s.Customer__c];
            AggregateResult[] groupedResults = [Select SUM(Customer_Price__c) 
                            From Service_Billings__c 
                            Where Active__c=true 
                            And Customer__c=:s.Customer__c];
            custAcct.Services_Total__c = Double.valueOf(groupedResults[0].get('expr0'));
            acctMap.put(s.Customer__c,custAcct);
          }  
          if(s.Active__c)
          {
            if(s.Service__c == prod.Id)
            {
              for(Special_Services_Sched__c spc : [Select Id 
                                  From Special_Services_Sched__c 
                                  Where Active__c=true 
                                    And RecordTypeId =:inSpecsRt.Id
                                    And Customer__c=:s.Customer__c])
              {
                if(spcMap.containsKey(spc.Id))
                  spcMap.remove(spc.Id);
                spc.Service_Billing__c = s.Id;
                spcMap.put(spc.Id,spc);
              }
            }
          }
        } 
        }
    }
    }
   
     if(!acctMap.isEmpty())
       acctList.addAll(acctMap.values());
    if(acctList.size() > 0)
      update(acctList);
      
    if(!spcMap.isEmpty())
      spcList.addAll(spcMap.values());
  if(spcList.size() > 0)
    update(spcList);
}

 
i am getting an error that is in code. line 287 is the very last line of code.  Any suggestions?
 
<apex:page standardController="Opportunity" renderAs="pdf" sidebar="false" title="Opportunity Quotation">
<apex:composition template="PDF_Header_Template">
    <apex:define name="extraStyle">
<style type="text/css">
.style4 {
    color: #000000;
    font-size: 14px;
    font-weight: bold;
}
#PreparedBy {
    position: absolute;
    width: 77%;
    height: 60px;
    left: 30px;
    top: 145px;
    border: 0px red solid;
}
.ShipAndBillSection {
    position: absolute;
    width: 99%;
    height: 90px;
    left: 5px;
    top: 215px;
    border: 0px blue solid;
}
.ShipAndBill {
    width: 340px;
    height: 90px;
    border: 1px silver solid;
    vertical-align: top;
}
.billToShipToLabel {
    font-size: 12px;
    width: 110px;
    height: 100%;
    vertical-align: top;
}
.addr {
    font-size: 12px;
    width: 450px;
    vertical-align: top;
}
.LineItems {
    position: absolute;
    left: 5px;
    height: 300px;
    top: 330px;
    z-index: 1;
    width: 99%;
    border: 0px green solid;
}
.LineItemsTable {
    width: 100%;
    height: 100%;
    border-top: 0px;
}
.LineItemHeader {
    background-color: gray;
    border: 1px gray solid;
    text-align: right;
}
.TotalColHeader {
    background-color: gray;
    border: 0px gray solid;
    text-align: right;
}
.TotalColRow {
    background-color: silver;
    border-right: 0px silver solid;
    text-align: right;
}
.LineItemCell {
    border-right: 1px silver solid;
    background-color: white;
    text-align: right;
}
#commentBox {
    position: relative;
    left: 100px;
    top: 10px;
    width: 80%;
}
#bottomSection {
    position: absolute;
    top: 770px;
    left: 130px;
    width: 450px;
    border: 0px aqua solid;
}
#ApprovalBlock {
    position: relative;
    left: 0px;
    top: 10px;
    width: 450px;
    border: 0px purple solid;
}
.approvalTable {
    width:100%;
    height:105px;
    border: 0px lime solid;
}
</style>
    </apex:define>
    <apex:define name="PageTitle">{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'WAGE ADJUSTMENT','QUOTATION')}</apex:define>
    <apex:define name="titleBoxInfo">
        <span class="style4"># {!Opportunity.Opportunity_Number__c}</span> <br />
        DATE:&nbsp;&nbsp; <apex:outputText value="{0,date,MM/dd/yyyy}"><apex:param value="{!Opportunity.CreatedDate}" /></apex:outputText>
        <br style="line-height:1.3;" />
        <apex:outputText value="VALID UNTIL: {0,date,MM/dd/yyyy}" rendered="{!IF(OR(ISBLANK(Opportunity.Valid_Until__c),ISNULL(Opportunity.Valid_Until__c)),'FALSE','TRUE')}"><apex:param value="{!Opportunity.Valid_Until__c}" /></apex:outputText>
    </apex:define>
</apex:composition>

<div id="PreparedBy">
    <table cellpadding="2" cellspacing="0" width="100%" border="0">
        <tr>
            <td style="width: 75px">Prepared By</td>
            <td colspan="2">{!$User.FirstName & " " & $User.LastName}</td>
        </tr>
        <tr>
            <td>Phone</td>
            <td colspan="2">{!$User.Phone}</td>
        </tr>
        <tr>
            <td>Email</td>
            <td>{!$User.Email}</td>
            <td style="width:300px;text-align:right;">Customer # {!Opportunity.Account.QB_Account_Number__c}</td>
        </tr>
    </table>
</div>
<div id="ShipAndBillSection" class="ShipAndBillSection">
    <table style="width:100%;height:100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td>
            <table cellpadding="0" cellspacing="0" class="ShipAndBill">
                <tr>
                    <td>
                    <table style="width:100%;height:100%;" cellpadding="1" cellspacing="1">
                        <tr>
                            <td rowspan="3" class="billToShipToLabel">BILL TO:</td>
                            <td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.Name,Opportunity.Account.Name)}</td>
                        </tr>
                        <tr><td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingStreet,Opportunity.Account.BillingStreet)}</td></tr>
                        <tr><td class="addr">{!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingCity,Opportunity.Account.BillingCity)}, 
                                             {!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingState,Opportunity.Account.BillingState)} 
                                             {!IF(Opportunity.Account.RecordType.Name='Service Customer',Opportunity.Account.Parent.BillingPostalCode,Opportunity.Account.BillingPostalCode)}
                            </td>
                        </tr>
                    </table>
                    </td>
                </tr>
            </table>
            </td>
            <td style="width: 30px;">&nbsp;</td>
            <td>
            <table cellpadding="0" cellspacing="0" class="ShipAndBill">
                <tr>
                    <td style="vertical-align: top;">
                    <table style="width:100%;height:100%;" cellpadding="1" cellspacing="1">
                        <tr>
                            <td rowspan="5" class="billToShipToLabel">SERVICE AT:</td>
                            <td class="addr">{!Opportunity.Account.Name}</td>
                        </tr>
                        <tr><td class="addr">{!Opportunity.Account.ShippingStreet}</td></tr>
                        <tr><td class="addr">{!Opportunity.Account.ShippingCity}, 
                                             {!Opportunity.Account.ShippingState} 
                                             {!Opportunity.Account.ShippingPostalCode}</td></tr>
                        <tr><td class="addr">{!Opportunity.Account.Phone}</td></tr>
                    </table>
                    </td>
                </tr>
            </table>
            </td>
        </tr>
    </table>
</div>
    <c:OpportunitySortedItems value="{!Opportunity}" />
<!-- 
<apex:outputPanel layout="block" styleClass="LineItems" rendered="{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'FALSE','TRUE')}">
    <table class="LineItemsTable" cellpadding="5" cellspacing="0">
        <thead>
            <tr class="LineItemHeader">
                <td style="text-align:left;width:15%;">Product Name</td>
                <td style="text-align:left;width:40%;">Description</td>
                <td style="width:15%;">Sales Price</td>
                <td style="width:15%;">Quantity</td>
                <td style="width:15%;" class="TotalColHeader">Total Price</td>
            </tr>
        </thead>
        <apex:repeat var="line" value="{!Opportunity.OpportunityLineItems}" >
                <tr>
                    <td class="LineItemCell" style="text-align:center;border-bottom:1px silver solid;border-left:1px silver solid;">{!line.PricebookEntry.Name}</td>
                    <td class="LineItemCell" style="text-align:left;border-bottom:1px silver solid;">{!line.Description}</td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.UnitPrice}" />
                        </apex:outputText>
                    </td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, #,###.00}">
                          <apex:param value="{!line.Quantity}" />
                        </apex:outputText>
                    </td>
                    <td class="TotalColRow" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.TotalPrice}" />
                        </apex:outputText>
                    </td>
                </tr>
        </apex:repeat>
    <tr><td height="50px" colspan="3" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;">&nbsp;</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;" >Grand Total</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">
            <apex:outputText value="{0, number, $###,###.00}">
                <apex:param value="{!Opportunity.Amount}" />
            </apex:outputText>
        </td>
    </tr>
    <tr><td colspan="5" align="left" style="padding: 10px 50px 5px 50px;"><div id="commentBox2">{!Opportunity.Quote_Comments__c}</div></td></tr>
</table>
</apex:outputPanel>
<apex:outputPanel layout="block" styleClass="LineItems" rendered="{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'TRUE','FALSE')}">
 <table class="LineItemsTable" cellpadding="5" cellspacing="0">
        <thead>
            <tr class="LineItemHeader">
                <td style="text-align:left;width:5%;">Service</td>
                <td style="text-align:left;width:65%;">Description</td>
                <td style="width:15%;">Sales Price</td>
                <td style="width:15%;"class="TotalColHeader">Total Price</td>
            </tr>
        </thead>
        <apex:repeat var="line" value="{!Opportunity.OpportunityLineItems}" >
                <tr>
                    <td class="LineItemCell" style="text-align:center;border-bottom:1px silver solid;border-left:1px silver solid;">{!line.PricebookEntry.Name}</td>
                    <td class="LineItemCell" style="text-align:left;border-bottom:1px silver solid;">{!line.Description}</td>
                    <td class="LineItemCell" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.UnitPrice}" />
                        </apex:outputText>
                    </td>
                    <td class="TotalColRow" style="border-bottom:1px silver solid;"><apex:outputText value="{0, number, $###,###.00}">
                          <apex:param value="{!line.TotalPrice}" />
                        </apex:outputText>
                    </td>
                </tr>
        </apex:repeat>
    <tr><td height="50px" colspan="2" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;">&nbsp;</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="2" class="LineItemCell" >&nbsp;</td>
        <td class="LineItemCell" style="border-bottom:1px gray solid;" >Grand Total</td>
        <td class="TotalColRow" style="border-bottom:1px gray solid;">
            <apex:outputText value="{0, number, $###,###.00}">
                <apex:param value="{!Opportunity.Amount}" />
            </apex:outputText>
        </td>
    </tr>
    <tr><td colspan="5" align="left" style="padding: 10px 50px 5px 50px;"><div id="commentBox2">{!Opportunity.Quote_Comments__c}</div></td></tr>
</table>
    <div id="commentBox">
    <apex:outputPanel rendered="{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'TRUE','FALSE')}">    
        <br /><br />When signed this Quote will serve as an addendum to the original service agreement and will change the monthly billing to the above stated amount.
    </apex:outputPanel>
    </div>
</apex:outputPanel>
-->
<div id="bottomSection">
    <div id="ReturnMsg" class="rtnMsg">
    The prices, specifications and conditions are satisfactory and are hereby accepted. 
    Square Feat, Inc. is authorized to do these items as specified.  Please line out 
    and initial any line items not needed.</div>
    <div id="ApprovalBlock">
        <table class="approvalTable" cellpadding="0" cellspacing="0">
            <tr><td style="width:75px;">Approved&nbsp;By</td><td style="width:375px;height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr><td>Date</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr><td>Signature</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
            <tr style="display:{!IF(OR(contains(Opportunity.RecordType.Name,'Special Service'),contains(Opportunity.RecordType.Name,'Addendum')),'visible','none')}">
            <td>{!IF(contains(Opportunity.RecordType.Name,'Addendum'),'Effective Date','')}{!IF(contains(Opportunity.RecordType.Name,'Special Service'),'Preferred Service Date','')}</td><td style="height:20px;border-bottom:1px gray solid;">&nbsp;</td></tr>
        </table>
    </div>
    <div style="align:center;">PLEASE FAX OR EMAIL BACK APPROVED {!IF(contains(Opportunity.RecordType.Name,'Addendum'),'ADDENDUM','QUOTE')} TO SCHEDULE WORK.</div>
    <br />
    <div style="align:center;font-weight:bold;">Thank you for the opportunity! Visit us on our web site at www.squarefeat.com</div>
</div>
</body>
</apex:page>

 
I would like to display the standard system info on a VF form.  What is the proper format to use for code that will show the created by name and time and last modified by name and time .  thank you
How can a default value be set in a VF page in a long text feild? Currently the default value set in the object feild for comments__c does not populate when the record is entered from the VF page.
 </apex:tab>
                <apex:tab label="Comments" name="CommentsTab" id="tabComments">
                    <apex:pageBlockSection columns="1" id="CommentsPageBlock">
                        <apex:outputField value="{!Inspection__c.Comments__c}" id="Comments" />
                    </apex:pageBlockSection>
                </apex:tab>
 
hi all,
 
is there any method by which we can send email with cc and bcc field?
 
i looked into workflow-> email alert but no cc and bcc options were given.
 
please help me its urgent.
 
thanks,
mahi
  • November 15, 2007
  • Like
  • 0