Skip to main content

Posts

Showing posts from February, 2018

Error cannot change item number because location is inventory

This is a case where you were not able to change item number of this asset from change item number. This error comes when we use select action "change Item Number" on asset application and assets location is inventory. To resolve this error you need to transfer this item to non inventory location using inventory usage application only. Also you need to select asset number or given full quantity if you want to move all asset attached with same item number and complete this record then asset location will be changed to your mentioned location inventory usage line. Then you will be able to change item no. on asset application.

How to generate stup files from WSDL

TO generate wsdl files from stub use following procedure Go to bin directory in cmd prompt C:\Program Files\Java\jdk1.8.0_161\bin Enter command WSIMPORT <Your wsdl Path?WSDL> If you recieve error for space in program space files use this command Go to D: "C:\Program Files\Java\jdk1.8.0_161\bin" -Keep <Your wsdl Path?WSDL> To define path where you want your files to be placed use wdimport "C:\Program Files\Java\jdk1.8.0_161\bin" -Keep -s D:\MyProject <Your wsdl Path?WSDL>

Skip Copy Field Method

This method is used to skip certain attributes on duplication. @Override protected boolean skipCopyField(MboValueInfo arg0) throws RemoteException, MXException { // TODO Auto-generated method stub boolean b=super.skipCopyField(arg0); String attributeName=arg0.getAttributeName(); for (int i = 0; i < dup.length; i++) { if(dup[i].equalsIgnoreCase(attributeName)) return true; } return b; }

Creating button to make workorder to WSCH status

You need to extend statefull bean class for this Sample class would be package custom.webclient.beans.workorder; import java.rmi.RemoteException; import psdi.mbo.MboSetRemote; import psdi.mbo.StatefulMboRemote; import psdi.util.MXApplicationException; import psdi.util.MXException; import psdi.webclient.system.beans.DataBean; public class CustStatefulAppBean extends StatefulAppBean { public int WSCH() throws RemoteException, MXException { DataBean db = app.getAppBean(); StatefulMboRemote mbo = (StatefulMboRemote) db.getMbo(); targetStatusOption = "WPCOND"; statusChangeButtonSigoption = "WPCOND"; mbo.setTargetStatusOption("WPCOND"); mbo.setStatusChangeButtonSigoption("WPCOND"); STATUSSUB(); clientSession.loadDialog("status"); return 1; }           public int STATUSSUB() throws MXException, RemoteException {      DataBean appBean = app.getAppBean();    StatefulMboRe...

Rewritting in Customization

Quite often peple write redundant code Example MboSetRemote invoiceLineSet=invoice.getMboSet("invoiceline"); if(invoiceLine.isEmpty()){ MboRemote invoiceLineMbo=invoiceLineSet.moveFirst(); while (invoiceLineMbo!=null) { Long constransId=invoiceLineMbo.getLong("CONSTRANSID"); if(constransId>0) { StringBuilder sb=new StringBuilder(); sb.append(String.ValueOf(constransId)); } } Here this line if(invoiceLine.isEmpty()){ is not nacessary because we are not taking string value of out of mboset or calling any moethod  from it sb.append(String.ValueOf(constransId)); this is also not required because sb.append method can handle Long values.