Creating a callout
Callout is mainly used to perform some dynamic actions when a value in a particular field is changed. Each field in ADempiere maps to a column in a particular table, so callout is configured at column level. Callout is a Java method that gets invoked when there is a change in the field data in a tab.
Getting ready
Launch Eclipse and open the adempiere_360
project in it.
How to do it...
1. Create a class, say,
CalloutMom
, in theorg.compiere.model
package.package org.compiere.model; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; import java.util.logging.Level; import org.compiere.util.DB; import org.compiere.util.Env; /** * * @author Ajit Kumar (ajit.kumar@walkingtree.in) * */ public class CalloutMom extends CalloutEngine { /** * Return the next item number available for a MOM * @param ctx Context * @param WindowNo current Window No * @param mTab Model Tab * @param mField Model Field * @param value The...