Greetings
I created new two XTendM3 custom APIs to add and get from an extend custom table. APIs work fine. I can test them from MITEST tool. But when trying to use the Get API in my extension trigger code, it return null result although it works as expected from MITEST.I don't know is there any special calling for the custom APIs or it the same call like the standard one but I wrote something wrong? 
Here is the Custom API testing result from MITEST tool.



Here is my code
---------------------------------------------
public class MMS002_WHS_CHK extends ExtendM3Trigger {
private final InteractiveAPI interactive
private final ProgramAPI program
private final LoggerAPI logger
private final DatabaseAPI database
private final MICallerAPI miCaller
public MMS002_WHS_CHK(InteractiveAPI interactive, UtilityAPI utility, ProgramAPI program, LoggerAPI logger,DatabaseAPI database,MICallerAPI miCaller) {
this.interactive = interactive
this.program = program
this.logger = logger
this.database = database
this.miCaller = miCaller
}
public void main() {
String CUA5 = GetAddress("2400","02","West");
interactive.showOkDialog("Address :${CUA5} " );
}
/**
* Retrieve customer GetAddress
*
* @param CUNO,ADRT,ADID
* @return CUA5
*/
private String GetAddress(String pCUNO,String pADRT,String pADID) {
String CUA5 = ""
interactive.showOkDialog("inputs :${pCUNO},${pADRT},${pADID} " );
def parameters = ["CUNO": pCUNO, "ADRT": pADRT ,"ADID": pADID];
Closure<?> handler = { Map<String, String> response ->
if (response.containsKey('errorMsid') || response.error == true) {
logger.info("No Status info found!")
interactive.showOkDialog("Address :No Status info found!" );
} else {
CUA5 = response.CUA5;
interactive.showOkDialog("Address :${CUA5} " );
}
}
miCaller.call("EXT065MI", "GetExtAddress", parameters, handler)
return CUA5;
}
}