You are here:
DefaultProductValidationServiceImpl
Validate product attributes.
Interface
VlocityOpenInterface
Sample Code
To Select All Product Entries From an Org
DefaultProductValidationServiceImpl p = new DefaultProductValidationServiceImpl();
Map<String, Object> input = new Map<String, Object>();
Map<String, Object> output = new Map<String, Object>();
String methodName = 'validateProduct';
p.invokeMethod(methodName, input, output, null);
To Select Products From a Particular Price Book
DefaultProductValidationServiceImpl p = new DefaultProductValidationServiceImpl();
Map<String, Object> input = new Map<String, Object>();
Map<String, Object> output = new Map<String, Object>();
String methodName = 'validateProduct';
String query = ' Product2.Name like \'InvalidProd%\''; // fields should be fields of PricebookEntry
// params
input.put('Query', query);
p.invokeMethod(methodName, input, output, null);
To Select a Product Using Query Conditions
DefaultProductValidationServiceImpl p = new DefaultProductValidationServiceImpl();
Map<String, Object> input = new Map<String, Object>();
Map<String, Object> output = new Map<String, Object>();
String methodName = 'validateProduct';
String query = ' Product2.Name like \'InvalidProd%\''; // fields should be fields of PricebookEntry
// params
input.put('Query', query);
p.invokeMethod(methodName, input, output, null);
To Select a Product From the Price Book Using Some Conditions
DefaultProductValidationServiceImpl p = new DefaultProductValidationServiceImpl();
Map<String, Object> input = new Map<String, Object>();
Map<String, Object> output = new Map<String, Object>();
String methodName = 'validateProduct';
String query = ' Product2.Name like \'InvalidProd%\'';
// params
input.put('Pricebook2Id', '01s280000097vL8AAI');
input.put('Query', query);
input.put('Operator', 'OR'); //pass 'And' or 'Or' if pricebook2Id and Query both are passed.
p.invokeMethod(methodName, input, output, null);
Related Implementations
None
