mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 11:43:26 +08:00
16 lines
659 B
OpenEdge ABL
16 lines
659 B
OpenEdge ABL
global with sharing class MyCustomRemoteClass implements omnistudio.VlocityOpenInterface2 {
|
|
|
|
global Boolean invokeMethod(String methodName, Map<String,Object> inputMap, Map<String,Object> outputMap, Map<String,Object> options) {
|
|
if (methodName.equals('calculateTotal')) {
|
|
calculateTotal(inputMap, outputMap);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private void calculateTotal(Map<String,Object> inputMap, Map<String,Object> outputMap) {
|
|
Decimal price = (Decimal)inputMap.get('price');
|
|
Decimal qty = (Decimal)inputMap.get('quantity');
|
|
outputMap.put('total', price * qty);
|
|
}
|
|
} |