Datos extra:
import trewa.bd.tpo.TpoPK;
import trewa.bd.trapi.trapiui.tpo.TrExpediente;
import trewa.exception.TrException;
import trewa.bd.trapi.trapiui.TrAPIUIFactory;
import trewa.bd.trapi.trapiui.TrAPIUI;
function Object numeroExpFromId(Object idExp) {
String idExpStr = (String) idExp;
String nExp = "";
try {
TrAPIUI apiUI = TrAPIUIFactory.crearAPIUI("java:jboss/datasources/jdbc/trewaCnx","SISTEMA");
TrExpediente exp = apiUI.obtenerDatosExpediente(new TpoPK(idExpStr));
if (exp != null) {
nExp = exp.getNUMEXP();
}
} catch (TrException e) {
System.out.println("Error al obtener el número de expediente");
}
return nExp;
}