Skip to content

Find a document

Find an existing Formbird document using its documentId.

Import Libraries
import org.apache.log4j.Logger;

import com.fieldtec.webclient.config.WebclientConfig;
import com.fieldtec.webclient.model.Document;
import com.fieldtec.webclient.service.FieldtecService;
import com.fieldtec.webclient.service.impl.FieldtecServiceImpl;
import com.fieldtec.webclient.util.UtilJson;
Setup the ftService
// Setup webclientConfig
WebclientConfig webclientConfig = WebclientConfig.getInstance();
webclientConfig.setAuthUrl(context.authUrl);
webclientConfig.setUsername(context.username);
webclientConfig.setPassword(context.password);
webclientConfig.setWebserviceUrl(context.webserviceUrl);

// Initialise ftService after setup of webclientConfig
FieldtecService ftService = new FieldtecServiceImpl();
Retrieve a Formbird document by documentId
String documentId = "5ba9bbee5b116026f1b23dad";

// Find document
Document result = ftService.find(documentId);

// Close ftService
ftService.close();