- Dewakar Reddy Karra 9
- NEWBIE
- 10 Points
- Member since 2018
-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
9Replies
Hi All. Iam new to Visualforce pages and when i'm trying to get the preview of my visualforce pages it gives me an error
System.QueryException: List has no rows for assignment to SObject
Class.IITStudyAbroadAppTrackerController.<init>: line 21, column 1
Below is my Apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
Class.IITStudyAbroadAppTrackerController.<init>: line 21, column 1
Below is my Apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
- Dewakar Reddy Karra 9
- December 19, 2018
- Like
- 0
- Continue reading or reply
Hi All, When iam trying access my visualforce button on my application it gives me this error. Can anyone please help me with this.
System.TypeException: Invalid conversion from runtime type Study_Abroad_Application__c to TargetX_SRMb__Application__c
Below is my apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
Visualforce Page:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Passport',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputPanel rendered="{TargetX_SRMb_Essay__c.IIT_Insufficiency_ID__c='!=null'}">
</apex:outputPanel>
</apex:outputpanel>
</apex:repeat>
<!--Study Abroad Insurance Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Insurance Form',ess.TargetX_SRMb__IsRequired__c='True',TragetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Appplication__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!--Study Abroad Waiver and Code of Conduct Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Waiver and code of Conduct Form',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Non-IIT Course Approval Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Non-IIT Course Approval Form',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Non-IIT Study Abroad Acceptable Letter-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Non-IIT Study Abroad Acceptable Letter',ess.TargetX_SRMb_IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null'}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}">
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
</apex:outputpanel>
<!-- Start of Insufficiency Block-->
<apex:outputPanel rendered="{!IF(OR(TargetX_SRMb__Essay__c.TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='Unchecked',TRUE,FALSE)}">
<div CLASS="row">
<h5>
Insufficient Documents></h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<TH>Reupload Link</TH>
</tr>
</thead>
</table>
<apex:repeat value="{!AppEssay}" var="essay">
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__C.Id=essay.Study_Abroad_Application__c,true,false)}"></apex:outputpanel>
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!Study_Abroad_Application__c.Contact__c}&tfa_5={!Study_Abroad_Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:repeat>
</div>
<apex:outputpanel rendered="{!AND(EnrollHis.size=0,AppEssay.size=0,AppRec.size=0)}">
<td COLSPAN="4"><i>You Have No Insufficient
Documents</i></td>
</apex:outputpanel>
</apex:outputPanel>
<apex:include pagename="StudyAbroadAppTracker_CSS" />
<SCRIPT type="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
Below is my apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
Visualforce Page:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Passport',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputPanel rendered="{TargetX_SRMb_Essay__c.IIT_Insufficiency_ID__c='!=null'}">
</apex:outputPanel>
</apex:outputpanel>
</apex:repeat>
<!--Study Abroad Insurance Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Insurance Form',ess.TargetX_SRMb__IsRequired__c='True',TragetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Appplication__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!--Study Abroad Waiver and Code of Conduct Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Study Abroad Waiver and code of Conduct Form',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Non-IIT Course Approval Form-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Non-IIT Course Approval Form',ess.TargetX_SRMb__IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Non-IIT Study Abroad Acceptable Letter-->
<apex:repeat value="{!ConEssay}" var="ess">
<apex:outputpanel rendered="{!AND(ess.name='Non-IIT Study Abroad Acceptable Letter',ess.TargetX_SRMb_IsRequired__c='True',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='false',Study_Abroad_Application__c=ess.Study_Abroad_Application__c}">
<apex:outputpanel rendered="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c='!=null'}">
</apex:outputpanel>
</apex:outputpanel>
</apex:repeat>
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}">
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
</apex:outputpanel>
<!-- Start of Insufficiency Block-->
<apex:outputPanel rendered="{!IF(OR(TargetX_SRMb__Essay__c.TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Essay__c.TargetX_SRMb__Complete__c='Unchecked',TRUE,FALSE)}">
<div CLASS="row">
<h5>
Insufficient Documents></h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<TH>Reupload Link</TH>
</tr>
</thead>
</table>
<apex:repeat value="{!AppEssay}" var="essay">
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__C.Id=essay.Study_Abroad_Application__c,true,false)}"></apex:outputpanel>
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!Study_Abroad_Application__c.Contact__c}&tfa_5={!Study_Abroad_Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:repeat>
</div>
<apex:outputpanel rendered="{!AND(EnrollHis.size=0,AppEssay.size=0,AppRec.size=0)}">
<td COLSPAN="4"><i>You Have No Insufficient
Documents</i></td>
</apex:outputpanel>
</apex:outputPanel>
<apex:include pagename="StudyAbroadAppTracker_CSS" />
<SCRIPT type="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
- Dewakar Reddy Karra 9
- December 19, 2018
- Like
- 0
- Continue reading or reply
Unknown property 'Study_Abroad_Application__cStandardController.enroll'
Hi All
I have been getting this error. I am new to the visual force and trying to figure out this error but couldn't resolve the issue
This is my visual force code:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<h4> </h4>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Valid_Passport__c,IIT_Passport_Expiration__c,IIT_Current_Valid_Passport_del__c)}"></apex:outputpanel>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Formal_English_Training__c='Unchecked',TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Complete__c='Unchecked')}"></apex:outputpanel>
<apex:outputfield Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c}" />
<apex:outputField Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID_Desc__c}" />
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}"></apex:outputpanel>
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
<!-- Start of Insufficiency Block-->
<div class="row">
<h5>Insufficient Documents</h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<th>Reupload Link</th>
</tr>
</thead>
<tbody>
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__c.Id=enroll.Study_Abroad_Application__c,true,false)}">
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!TargetX_SRMb__Application__c.TargetX_SRMb__Contact__r.TargetX_Base__Access_Key__c}&tfa_5={!TargetX_SRMb__Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:outputpanel>
</tbody>
<apex:repeat value="{!AppRec}" var="rec">
<apex:outputpanel RENDERED="{!IF(Study_Abroad_Application__c.Id=rec.Study_Abroad_Application__c,true,false)}">
<tr>
</tr>
</apex:outputpanel>
</apex:repeat>
<apex:include PAGENAME="StudyAbroadAppTracker_CSS" />
<SCRIPT TYPE="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</table>
</div>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
This My Apex class Controller:
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
I have been getting this error. I am new to the visual force and trying to figure out this error but couldn't resolve the issue
This is my visual force code:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<h4> </h4>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Valid_Passport__c,IIT_Passport_Expiration__c,IIT_Current_Valid_Passport_del__c)}"></apex:outputpanel>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Formal_English_Training__c='Unchecked',TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Complete__c='Unchecked')}"></apex:outputpanel>
<apex:outputfield Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c}" />
<apex:outputField Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID_Desc__c}" />
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}"></apex:outputpanel>
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
<!-- Start of Insufficiency Block-->
<div class="row">
<h5>Insufficient Documents</h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<th>Reupload Link</th>
</tr>
</thead>
<tbody>
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__c.Id=enroll.Study_Abroad_Application__c,true,false)}">
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!TargetX_SRMb__Application__c.TargetX_SRMb__Contact__r.TargetX_Base__Access_Key__c}&tfa_5={!TargetX_SRMb__Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:outputpanel>
</tbody>
<apex:repeat value="{!AppRec}" var="rec">
<apex:outputpanel RENDERED="{!IF(Study_Abroad_Application__c.Id=rec.Study_Abroad_Application__c,true,false)}">
<tr>
</tr>
</apex:outputpanel>
</apex:repeat>
<apex:include PAGENAME="StudyAbroadAppTracker_CSS" />
<SCRIPT TYPE="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</table>
</div>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
This My Apex class Controller:
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
- Dewakar Reddy Karra 9
- December 13, 2018
- Like
- 0
- Continue reading or reply
Hi All. Iam new to Visualforce pages and when i'm trying to get the preview of my visualforce pages it gives me an error
System.QueryException: List has no rows for assignment to SObject
Class.IITStudyAbroadAppTrackerController.<init>: line 21, column 1
Below is my Apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
Class.IITStudyAbroadAppTrackerController.<init>: line 21, column 1
Below is my Apex class
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
Public Study_Abroad_Application__c enroll {get; set;}
Public Study_Abroad_Application__c essay {get; set;}
Public Study_Abroad_Application__c AppEssay{get; set;}
Public Study_Abroad_Application__c ConEssay{get; set;}
Public TargetX_SRMb__Application__c getapplication() {
return null;
}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
- Dewakar Reddy Karra 9
- December 19, 2018
- Like
- 0
- Continue reading or reply
Unknown property 'Study_Abroad_Application__cStandardController.enroll'
Hi All
I have been getting this error. I am new to the visual force and trying to figure out this error but couldn't resolve the issue
This is my visual force code:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<h4> </h4>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Valid_Passport__c,IIT_Passport_Expiration__c,IIT_Current_Valid_Passport_del__c)}"></apex:outputpanel>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Formal_English_Training__c='Unchecked',TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Complete__c='Unchecked')}"></apex:outputpanel>
<apex:outputfield Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c}" />
<apex:outputField Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID_Desc__c}" />
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}"></apex:outputpanel>
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
<!-- Start of Insufficiency Block-->
<div class="row">
<h5>Insufficient Documents</h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<th>Reupload Link</th>
</tr>
</thead>
<tbody>
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__c.Id=enroll.Study_Abroad_Application__c,true,false)}">
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!TargetX_SRMb__Application__c.TargetX_SRMb__Contact__r.TargetX_Base__Access_Key__c}&tfa_5={!TargetX_SRMb__Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:outputpanel>
</tbody>
<apex:repeat value="{!AppRec}" var="rec">
<apex:outputpanel RENDERED="{!IF(Study_Abroad_Application__c.Id=rec.Study_Abroad_Application__c,true,false)}">
<tr>
</tr>
</apex:outputpanel>
</apex:repeat>
<apex:include PAGENAME="StudyAbroadAppTracker_CSS" />
<SCRIPT TYPE="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</table>
</div>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
This My Apex class Controller:
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
I have been getting this error. I am new to the visual force and trying to figure out this error but couldn't resolve the issue
This is my visual force code:
<apex:page EXTENSIONS="IITStudyAbroadAppTrackerController,TargetX_SRMb.AppTrackerController"
SHOWHEADER="FALSE"
STANDARDCONTROLLER="Study_Abroad_Application__c"
STANDARDstyleSHEETS="false">
<head>
<LINK HREF="http://web.iit.edu/sites/web/themes/iit_web/favicon.ico"
REL="icon" TYPE="image/x-icon" />
<LINK HREF="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
REL="stylesheet" />
<SCRIPT SRC="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></SCRIPT>
<SCRIPT SRC="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></SCRIPT>
<TITLE>IIT Admission - Application Status</TITLE>
</head>
<apex:outputtext rendered="false"
value="{!Study_Abroad_Application__c.Contact__c}" />
<div class="container">
<apex:outputpanel RENDERED="{!accessError}">
<div CLASS="row">
<div CLASS="col-md-9">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-3">
<div CLASS="well-lg">
</div>
</div>
</div>
<div CLASS="row" STYLE="margin-top: 25px;">
<div CLASS="col-md-12">
<h1>Access Denied</h1>
<apex:outputpanel id="ApplicationDetails">
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<h4>Application Details</h4>
<b>Submit Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Banner_ID__c }"/>
<b>Approval Date:</b>
<apex:outputField value="{!Study_Abroad_Application__c.IIT_Study_Abroad_Advisor_Approval_Date__c }"/>
</div>
</div>
</apex:outputpanel>
</div>
</div>
</apex:outputpanel>
</div>
<apex:outputpanel RENDERED="{!NOT(accessError)}">
<div CLASS="row">
<div CLASS="col-md-12">
<apex:include PAGENAME="StudyAbroadAppTrackerHeader" />
</div>
<div CLASS="col-md-12">
<BR/>
</div>
</div>
<div CLASS="row">
<div CLASS="col-md-12 well well-lg">
<div CLASS="col-md-4">
<h4>{!contact.FirstName} {!contact.LastName}</h4>
<APEX:PARAM VALUE="{!Study_Abroad_Application__c.IIT_Banner_ID__c}" />
</div>
<div CLASS="col-md-4">
<!--Study Abroad Passport-->
<h4> </h4>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Valid_Passport__c,IIT_Passport_Expiration__c,IIT_Current_Valid_Passport_del__c)}"></apex:outputpanel>
<apex:outputpanel RENDERED="{IF(OR(Study_Abroad_Application__c.IIT_Formal_English_Training__c='Unchecked',TargetX_SRMb__IsRequired__c='Unchecked',TargetX_SRMb__Complete__c='Unchecked')}"></apex:outputpanel>
<apex:outputfield Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID__c}" />
<apex:outputField Value="{TargetX_SRMb__Essay__c.IIT_Insufficiency_ID_Desc__c}" />
<!-- Start of Decision Block-->
<apex:outputpanel rendered="{Study_Abroad_Application__c.IIT_Study_Abroad_Application_Status__c='Applying'}"></apex:outputpanel>
<div class="row">
<div class="col-md-12 well well-lg">
<div class="col-md-6">
<h4>Decision Status</h4>
</div>
</div>
</div>
<!-- Start of Insufficiency Block-->
<div class="row">
<h5>Insufficient Documents</h5>
<table CLASS="table table-bordered table-striped">
<thead>
<tr>
<th>Item</th>
<th>Insufficiency Reason</th>
<th>Additional Insufficiency Notes</th>
<th>Reupload Link</th>
</tr>
</thead>
<tbody>
<apex:outputpanel rendered="{!IF(Study_Abroad_Application__c.Id=enroll.Study_Abroad_Application__c,true,false)}">
<tr>
<td>{!essay.name}</td>
<td>{!essay.IIT_Insufficiency_ID_Desc__c}</td>
<td>{!essay.IIT_Additional_Insufficiency_Notes__c}</td>
<td><apex:outputlink value="https://iit.secure.force.com/form?formid=217763&tfa_2={!essay.Id}&tfa_3={!Contact.Id}&tfa_6={!TargetX_SRMb__Application__c.TargetX_SRMb__Contact__r.TargetX_Base__Access_Key__c}&tfa_5={!TargetX_SRMb__Application__c.Id}">Reupload
your document</apex:outputlink></td>
</tr>
</apex:outputpanel>
</tbody>
<apex:repeat value="{!AppRec}" var="rec">
<apex:outputpanel RENDERED="{!IF(Study_Abroad_Application__c.Id=rec.Study_Abroad_Application__c,true,false)}">
<tr>
</tr>
</apex:outputpanel>
</apex:repeat>
<apex:include PAGENAME="StudyAbroadAppTracker_CSS" />
<SCRIPT TYPE="text/javascript">
$(document).ready(function(){
var windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
$(window).resize(function(){
windowHeight = $(window).height();
$('.container').css(
"min-height", windowHeight
);
});
});
</SCRIPT>
</table>
</div>
</div>
</div>
</div>
</apex:outputpanel>
</apex:page>
This My Apex class Controller:
public with sharing class IITStudyAbroadAppTrackerController {
Public id contactID {get; set;}
Public id studyAbroadApplicationID {get; set;}
Public Study_Abroad_Application__c studyAbroadApplication {get; set;}
Public List<TargetX_SRMb__Essay__c> essayList {get; set;}
Public List<Study_Abroad_Interest__c> studyAbroadInterestList {get; set;}
//Public Boolean accessError{get;set}
Public IITStudyAbroadAppTrackerController(ApexPages.StandardController controller) {
this.studyAbroadApplicationID = controller.getRecord().id;
this.contactID = ([SELECT ID, Contact__c,Name
FROM Study_Abroad_Application__c
WHERE id = :studyAbroadApplicationID LIMIT 1]).Contact__c;
this.studyAbroadApplication = this.queryStudyAbroadApplication();
this.essayList = this.queryEssayList();
this.studyAbroadInterestList = this.queryStudyAbroadInterestList();
}
Public Study_Abroad_Application__c queryStudyAbroadApplication(){
// queryStudyAbroadApplication queries for a list of Study Abroad Application records that match the application ID, then takes the first record to return
List<Study_Abroad_Application__c> appList = [
SELECT ID,
IIT_Study_Abroad_Application_Status__c,
IIT_Study_Abroad_Advisor_Approval_Date__c,
IIT_Banner_ID__c,
Name
FROM Study_Abroad_Application__c
WHERE ID = :studyAbroadApplicationID
];
if(appList.size() > 0) {
return appList[0];
} else {
// If the query fails to find a record, return null. This shouldn't occur since the method uses an ID
return null;
}
}
Public List<TargetX_SRMb__Essay__c> queryEssayList() {
// queryEssayList queries for a list of Essay records that match the contact and study abroad application ID
List<TargetX_SRMb__Essay__c> essayList = [
SELECT ID,
TargetX_SRMb__Contact__c,
TargetX_SRMb__Application__c,
TargetX_SRMb__Essay_File_URL__c,
TargetX_SRMb__Essay_Key__c,
TargetX_SRMb__Personal_Essay_Type__c,
TargetX_SRMb__SRM_ETL_ID__c,
TargetX_SRMb__Complete__c,
TargetX_SRMb__IsRequired__c,
TargetX_SRMb__RequirementID__c,
TargetX_SRMb__Type__c,
IIT_Insufficiency_ID__c,
IIT_Insufficiency_ID_Desc__c
FROM TargetX_SRMb__Essay__c
WHERE TargetX_SRMb__Contact__c = :contactID AND IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return essayList;
}
Public List<Study_Abroad_Interest__c> queryStudyAbroadInterestList() {
// queryStudyAbroadInterestList queries for a list of Study Abroad Interest records that match the study abroad application ID
List<Study_Abroad_Interest__c> studyAbroadInterestList = [
SELECT ID,
IIT_Contact__c,
IIT_Available_Fall__c,
IIT_Available_Spring__c,
IIT_Available_Summer__c,
Elevate_Study_Abroad_Opportunities__c,
IIT_Opportunity_Type__c,
IIT_Study_Abroad_Program_Start_Date__c,
IIT_Study_Abroad_Program_End_Date_del__c
FROM Study_Abroad_Interest__c
WHERE IIT_Study_Abroad_Application__c = :studyAbroadApplicationID
];
return studyAbroadInterestList;
}
}
- Dewakar Reddy Karra 9
- December 13, 2018
- Like
- 0
- Continue reading or reply