Advertisement
Guest User

Untitled

a guest
Mar 8th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. 1.********************MY VISUALFORCE PAGEBLOCK CODE********************
  2. 2.<apex:pageBlock title="Possible Personal Customer(s)" rendered="{!DisplayPosPersonalRecords = true && checkCustomer = 'No'}">
  3. 3. <apex:pageBlockTable value="{!ListPossiblePersonalRecords}" var="per" columnsWidth="5px, 5px" border="1">
  4. 4. <apex:column headerValue="Options">
  5. 5. <apex:commandLink value="Selectd" style="font-weight:bold;" action="{!SubmitNewContactMoveToOpp}" >
  6. 6. <apex:param name="paccId" value="{!per.Id}" assignTo="{!SelectedId}"/>
  7. 7. <apex:param name="paccType" value="Ppersonal" assignTo="{!SelectedType}" />
  8. 8. </apex:commandLink>
  9. 9. </apex:column>
  10. 10. <apex:column headerValue="Customer Name" value="{!per.aName}" width="80px"/>
  11. 11. ..
  12. 12. ..
  13. 13. ..
  14. 14. </apex:pageBlockTable>
  15. 15.</apex:pageBlock>
  16. 16.
  17. 17.********************MY APEX CODE {!ListPossiblePersonalRecords} NOW********************
  18. 18.public List<accountset> getListPossiblePersonalRecords() {
  19. 19.
  20. 20. accountlist = new List<accountset>();
  21. 21. string cemail = v_con.Email;
  22. 22. string cLastName = v_con.LastName;
  23. 23. string cFirstName = v_con.FirstName;
  24. 24.
  25. 25. List<Contact> Con = [select Id, Name, Email, FirstName,
  26. 26. LastName, CreatedDate, CreatedById,
  27. 27. Date_of_Birth__c, AccountId
  28. 28. from Contact
  29. 29. where email =: cemail
  30. 30. and LastName =: cLastName
  31. 31. and FirstName =: cFirstName];
  32. 32. for(Contact a:Con){
  33. 33. accountset thelist = new accountset();
  34. 34. thelist.Id = a.Id;
  35. 35. thelist.aName = a.Name;
  36. 36. thelist.DoB = a.Date_of_Birth__c;
  37. 37. thelist.Email = a.Email;
  38. 38. thelist.CreDate = a.CreatedDate;
  39. 39. accountlist.add(thelist);
  40. 40. }
  41. 41. return accountlist;
  42. 42.
  43. 43.}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement