Skip to Content
0
Former Member
Jan 19, 2006 at 09:51 PM

Getting arrayindexoutofboundsexception when accessing string

14 Views

I have a major problem and a short deadline so please help. I'm accessing CRM using a function someone else developed. I input two strings (a productnumber and a one letter code) I should get two strings back (an "X" if the product exists otherwise "" and the productname) Im using below code to test this.

wdThis.wdGetCreateCampController().executeZ_Existance_Check();

IWDMessageManager manager = wdComponentAPI.getMessageManager();

String testExists = "";

String testProdText = "";

try

{

testExists = wdGetContext().currentExists_OutputElement().getExists();

testProdText =wdGetContext().currentExists_OutputElement().getProd_Text();

}

catch(Exception ex)

{

manager.reportException(ex.toString()":Exists="testExists":ProdText="testProdText, false);

}

manager.reportSuccess("Exists="testExists":ProdText="+testProdText);

It works as far as filling testExists (it gets filled with an "X" which shows in the generated message), but when I try to fill testProdText I get an arrayindexoutofboundsexception.

NWDS agrees with me that getProd_Text should return a string. If i put a "." after it suggest string methods (trim, substr and so on)

I've tried to delete the model and reimport it to no avail. Please help. Im at my wits end.

Regards

Carl Schultze