Here is a sample code to use getSelectValue using Java to obtain custom transaction form internal id:
private void getCustomFormInternalId() throws RemoteException
{
GetSelectValueFieldDescription fieldDescription =
new GetSelectValueFieldDescription();
fieldDescription.setRecordType(RecordType.customer);
fieldDescription.setField("customform");
fieldDescription.setFilter(new GetSelectValueFilter());
fieldDescription.getFilter().setFilterValue("Standard Customer Form");
fieldDescription.getFilter().setOperator(GetSelectValueFilterOperator.is);
GetSelectValueResult result = _service.getSelectValue(fieldDescription, 1);
if (result.getStatus().isIsSuccess())
{
RecordRef recordRef = (RecordRef)result.getBaseRefList().getBaseRef(0);
System.out.println("Internal Id: " + recordRef.getInternalId());
}
else
{
displayError(result.getStatus().getStatusDetail());
}
}
No comments:
Post a Comment