Monday, August 31, 2020

How to read values from lookup?

private HashMap<String, String> readLookupEntries(String lookupName){

HashMap<String, String> lookupEntryMap = new HashMap<String, String>();

tcLookupOperationsIntf  lookupOperationsIntf = Platform.getService(tcLookupOperationsIntf.class);

try {

tcResultSet resultSet =  lookupOperationsIntf.getLookupValues(lookupName);

for(int i = 0; resultSet.getRowCount(); i++){

resultSet.goToRow(i);

lookupEntryMap.put(resultSet.getStringValue("Lookup Definition.Lookup Code Information.Code Key"), resultSet.getStringValue("Lookup Definition.Lookup Code Information.Decode") );

}

catch(Exception e){

e.printStackTrace();

}

finally{

lookupOperationsIntf.close();

}

return lookupEntryMap;




No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...