String != String – Handing over SSJS String parameter to a backend Java method

String != String – Handing over SSJS String parameter to a backend Java method

Be careful when calling methods of a Back End Java Class with a String parameter.

This Call:

AccountManager.refreshAccountItems(sType, "MAXCASH");

Will cause this exception:
com.ibm.jscript.InterpretException: Script interpreter error, line=36, col=54: Java method ‘refreshAccountItems(java.lang.String, string)’ on java class ‘com.belsoft.accounting.AccountManager’ not found

Solution:

var sSortBy:java.lang.String = "MAXCASH";
AccountManager.refreshAccountItems(sType, sSortBy);

Leave a Reply

comment-avatar

*