Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. public class NPSSurveyController{
  2.  
  3. /*
  4. Property that will hold all the NPS Follow-Ups
  5. associated with the current NPS Follow-Up.
  6.  
  7. This iterable list can be used in apex:repeat,
  8. apex:pageBlockTable etc to display all the
  9. details contained in each entity(Case)
  10. within the List.
  11. */
  12. public List<NPS_Follow_Up__c> RelatedFollowUps
  13. {
  14. get;
  15. set;
  16. }
  17.  
  18. /*
  19. Private Property that will hold the details of the
  20. Visit Preparation in the current context.
  21.  
  22. This is not needed on the VF Page and hence marked as
  23. Private.
  24. */
  25. private NPS_Survey__c CurrentNPSSurvey
  26. {
  27. get;
  28. set;
  29. }
  30.  
  31. /*ctor*/
  32. public NPSSurveyController(
  33. ApexPages.StandardController controller
  34. ) {
  35.  
  36. /*
  37. Get the Visit Preparation record in
  38. the current context
  39. */
  40. CurrentNPSSurvey =
  41. (NPS_Survey__c)controller.getRecord();
  42.  
  43.  
  44. fetchRelatedFollowUps();
  45.  
  46. }
  47.  
  48.  
  49.  
  50. /*
  51. Execute a SOQL and fetch the related
  52. Follow-Ups and save it to the List
  53. */
  54.  
  55. private void fetchRelatedFollowUps(){
  56. RelatedFollowUps =
  57. [
  58. SELECT
  59. Id,
  60. Name,
  61. Case__c,
  62. Division__c,
  63. Contact_Name__c,
  64. Comment_Category__c,
  65. Email_Address__c,
  66. Follow_Up_Type__c,
  67. General_Comments__c,
  68. HOT__c,
  69. No_Answer__c,
  70. NPS_CUR__c,
  71. NPS_Survey__c,
  72. Opportunity__c,
  73. Phone_Number__c,
  74. Phone_Number_From_CUR__c,
  75. Phone_Type__c,
  76. Q1_Response__c,
  77. Q2_Response__c,
  78. Q3_Response__c,
  79. Requested_Contact_Time__c,
  80. Sales_Journal__c
  81. FROM
  82. NPS_Follow_Up__c
  83. WHERE
  84. NPS_Survey__c =
  85. :CurrentNPSSurvey.Id
  86. ];
  87. }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement