Call Apex Class In Integration Procedure
Frist write Apex Class For Query 5 account Data
Apex Code For Call Integration Procedure
In Apex class Create Global and implements Callable
global without sharing class ClassCalledFromIP implements Callable {
public Object call(String action, Map args) {
Map input = (Map) args.get('input');
Map output = (Map) args.get('output');
Map options = (Map) args.get('options');
return invokeMethod (action, input, output, options); }
private boolean invokeMethod(String methodName, Map inputMap, Map outMap,Map < String, Object > options) {
Boolean result = true ;
try {
if (methodName.equalsIgnoreCase('getAccount')){
getAccount(inputMap,outMap,options);
}Else{
outMap.put('result','');
}
}catch(Exception e){
return false;
} return result;
} public void getAccount (Map < String, Object > input, Map outMap, Map < String, Object > options){
List GetAccountData = [ select Id , Name from Account limit 5];
outMap.put('result',GetAccountData);
} }
In Integration Procedure
Remote Class – here we inter Apex Class Name
Remote Method – here we inter Apex Class Method Name
Remote Options — Send options In Apex Class From Integration Procedure
ADDITIONAL INPUT/OUTPUT/FAILURE RESPONSE > Return Only Additional Output > Additional Output — here we received data from apex class
ResponseAction–
Additional Output — in %%sine we inter RemortAction Element Name:Additional Output == %RemoteAction_CallApex:returnData%
In Preview Tab