You need to sign in to do that
Don't have an account?
call to web services
How can I call this web service that's in an Apex class from Visual Force Page
WebService static String submitCourseRequirement(String requirementId) {
return processRecordApprovalSubmission(requirementId, 'Requirement__c', new Requirement__Share());
}
This is what i am doing in the visual force page
function Submit(reqId, seid, ccode){
var answer = confirm("Would you like to proceed?");
sforce.connection.sessionId = "{!$Api.Session_ID}";
if (answer) {
try{
var resultVal = sforce.apex.execute("StudentManagement","submitCourseRequirement", {requirementId:reqId});
}catch(e){
('This are not working: ' + e);
}
("Selected Note has been successfully submitted for review.");
return true;
}else{
return false;
}
<apex:commandLink action="{!saveComment}" rendered="{! NOT( exemptionCommentsBool)}" >
<apex:image id="theSubmitImage1" value="/servlet/servlet.FileDownload?file=015Q00000000z4M" width="50px" height="50px"/>
<apex:outputLink rendered="{!NOT(exemptionCommentsBool)}" value="{!$Page.SMRequirementsDownload}?seid={!StudentEngagement}" onClick="return Submit( '{!docReq.reqRecord.Id}', '{!StudentEngagement}', '{!CourseCode}');"/>
</apex:commandLink>
I know this is not the correct way because on click of the image, the function is not called. Can someone please point what i am doing wrong?
Call a method in the controller class which calls the web service method.
public void controllerMethod(){
class.submitCourseRequirement(requirementId);
}
All Answers
Call a method in the controller class which calls the web service method.
public void controllerMethod(){
class.submitCourseRequirement(requirementId);
}
I can't thank you enough!