-
Notifications
You must be signed in to change notification settings - Fork 0
/
IntegrationProcedureRemoteActionApexCode.txt
31 lines (27 loc) · 1.23 KB
/
IntegrationProcedureRemoteActionApexCode.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//global class testApex implements omnistudio.VlocityOpenInterface {
global class testApex implements System.Callable, omnistudio.VlocityOpenInterface {
global Object call(String action, Map<String,Object> args) {
system.debug('method --> '+action);
system.debug('args --> '+args);
map<string,Object>input = (map<string,Object>)args.get('input');
map<string,Object>output = (map<string,Object>)args.get('output');
map<string,Object>outPutData = new map<string,Object>();
system.debug('input --> '+input);
list<Account> accList = [select id, name from Account limit 5];
list<string> accToSend = new list<string>();
for(Account acc : accList){
accToSend.add(acc.Name);
}
outPutData.put('AccountNames',accToSend);
outPutData.put('someKey',input.get('recordId'));
output.put('outputNode',outPutData);
output.remove('error');
output.remove('errorCode');
system.debug('output --> '+output);
return null;
}
//InvokeMethod
global boolean invokeMethod(string methodName, map<string,Object>input, map<string,Object>output, map<string,Object>options){
return null;
}
}