Код: Выделить всё
@RecordTriggerInfo(object = "welotranslate__c", events = {RecordEvent.BEFORE_INSERT})
public class HelloWorld implements RecordTrigger {
public void execute(RecordTriggerContext recordTriggerContext) {
final HttpGet request = new HttpGet("https://www.google.com"); // this class not found
HttpClient httpClient = HttpClients.createDefault(); // this class not found
HttpGet httpGet = new HttpGet("http://www.google.com"); // this class not found
HttpResponse response = null;
try {
response = httpClient.execute(httpGet);
} catch (IOException e) {
throw new RuntimeException(e);
}
String responseString = null;
try {
responseString = EntityUtils.toString(response.getEntity(), "UTF-8");
} catch (IOException e) {
throw new RuntimeException(e);
}
System.out.println(responseString);
RecordService recordService = ServiceLocator.locate(RecordService.class);
List recordList = VaultCollections.newList();
for (RecordChange inputRecord : recordTriggerContext.getRecordChanges()) {
String name = inputRecord.getNew().getValue("demo__c", ValueType.STRING);
inputRecord.setError("amazing", responseString.substring(0,3));
}
}
import org.apache.http.httpresponse;
^
Javasdk/src/main/java/com/Veeva/vault/custom/triggers/helloworld.java:8: ошибка : пакет org.apache.http.client не существует
import org.apache.http.client.httpclient;
^< /p>
Подробнее здесь: https://stackoverflow.com/questions/784 ... -libraries