Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NPSSurveyController{
- /*
- Property that will hold all the NPS Follow-Ups
- associated with the current NPS Follow-Up.
- This iterable list can be used in apex:repeat,
- apex:pageBlockTable etc to display all the
- details contained in each entity(Case)
- within the List.
- */
- public List<NPS_Follow_Up__c> RelatedFollowUps
- {
- get;
- set;
- }
- /*
- Private Property that will hold the details of the
- Visit Preparation in the current context.
- This is not needed on the VF Page and hence marked as
- Private.
- */
- private NPS_Survey__c CurrentNPSSurvey
- {
- get;
- set;
- }
- /*ctor*/
- public NPSSurveyController(
- ApexPages.StandardController controller
- ) {
- /*
- Get the Visit Preparation record in
- the current context
- */
- CurrentNPSSurvey =
- (NPS_Survey__c)controller.getRecord();
- fetchRelatedFollowUps();
- }
- /*
- Execute a SOQL and fetch the related
- Follow-Ups and save it to the List
- */
- private void fetchRelatedFollowUps(){
- RelatedFollowUps =
- [
- SELECT
- Id,
- Name,
- Case__c,
- Division__c,
- Contact_Name__c,
- Comment_Category__c,
- Email_Address__c,
- Follow_Up_Type__c,
- General_Comments__c,
- HOT__c,
- No_Answer__c,
- NPS_CUR__c,
- NPS_Survey__c,
- Opportunity__c,
- Phone_Number__c,
- Phone_Number_From_CUR__c,
- Phone_Type__c,
- Q1_Response__c,
- Q2_Response__c,
- Q3_Response__c,
- Requested_Contact_Time__c,
- Sales_Journal__c
- FROM
- NPS_Follow_Up__c
- WHERE
- NPS_Survey__c =
- :CurrentNPSSurvey.Id
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement