Difference between revisions of "HOWTOs and FAQs"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Where to put extensions)
(FAQs)
Line 60: Line 60:
  
 
=FAQs=
 
=FAQs=
 +
 +
== RUN_ImportAdempiere related ==
  
 
== RUN_Setup related ==
 
== RUN_Setup related ==

Revision as of 18:01, 3 April 2007

HOWTOs

Creating Alert

https://sourceforge.net/forum/message.php?msg_id=3938031 By: avdalen

I struggled with creating an Alert but now that I have it working, I would like to give a couple of pointers for anyone else who is trying it.

Pre-Requisites

  • Emailing must be working. Navigate to General Rules→Client Rules→Client to review, setup and test.

Example 1

  1. Log in as an admin (or role with appropriate access)
  2. Navigate to Performance Analysis→Performance Measurement→Alert
  3. Create a new record, name it Orders (or anything you prefer)
  4. Select an existing alert processor or create a new one. This alert processor is the component that will send emails the actual emails.
  5. Enter subject and alert message
  6. Mark as Valid
  7. Save record

Alert Rule Tab

  1. Create a new record, name it Orders Alert (or anything you prefer)
  2. In the sqlSelect field enter
    • "C_ORDER_ID","DOCUMENTNO","DOCSTATUS","TOTALLINES","GRANDTOTAL"
  3. In the sqlFrom field enter
    • C_ORDER
  4. In the sqlWhere field enter
    • ISACTIVE='Y' and ISSOTRX='Y'
  5. Mark as Valid
  6. Save record

Alert Recipient Tab

  1. Create a new record
  2. Select a User/Contact
  3. Save record

Testing the new Alert

Start the Application Server if not yet started.

Open compiereMonitor in a browser http://<your server>/compiereMonitor Navigate to the Alert processor that you assigned to your Alert. Click on run now

Navigate back to the Alert processor in the monitor and check the log.

If the alert failed, you would have to navigate back to the Alert window in compiere. Once the necessary corrections have been made, you have to mark the alert and alert rule as Valid again.

NOTE: Remember to restart the Application Server before you attempt to rerun the processor.


Example 2

Send an alert listing completed orders that are due for delivery within the next 7 days.

Create the Alert as per Example 1 above but this time assign the sqlWhere clause on the Alert Tab as:

  • sqlWhere clause
    ISACTIVE='Y' and ISSOTRX='Y' and DOCSTATUS='CO' and ISDELIVERED='N' and DATEPROMISED between sysdate and (sysdate +7)

FAQs

RUN_ImportAdempiere related

RUN_Setup related

Can't access http://server_name:8080 from clients

I've installed Adempiere and I'm not able to connect to it using a windows xp client. From the server machine, going to http://server_name:8080 works and I see the webstart homepage. So does http://127.0.0.1:8080. But wont work if you try to access http://192.168.0.103:8080.

This problem can arise when the client can't resolve the name server_name. 
Workaround:
Install RUN_Setup giving the IP address 192.168.0.103


Troubleshooting customizations

No Identifier records found

Error loading Lookup for a field, this error is shown in the console:

===========> MLookupFactory.getLookup_TableDir: No Identifier records found: CUST_Table

There are no identifier columns defined in CUST_Table.
You must mark identifier columns with isIdentifier = 1, 2 ...

No query columns found

Error looking columns in fields of type Search, this error is shown in the console:

===========> InfoGeneral.initInfoTable: No query columns found

Adempiere tries to look String column that appears in any window, the following query is executed:

SELECT   c.columnname, t.ad_table_id, t.tablename
    FROM ad_table t INNER JOIN ad_column c ON (t.ad_table_id = c.ad_table_id)
   WHERE c.ad_reference_id = 10
     AND t.tablename = ?
--       // Displayed in Window
     AND EXISTS (
            SELECT *
              FROM ad_field f
             WHERE f.ad_column_id = c.ad_column_id
               AND f.isdisplayed = 'Y'
               AND f.isencrypted = 'N'
               AND f.obscuretype IS NULL)
--       //
ORDER BY c.isidentifier DESC, c.seqno

If the field is not displayed in any window, it's not taken as search column. 

No Info for AD_Table_ID

Adempiere can't found information for a table,, this error is shown in the console: ===========> InfoGeneral.initInfoTable: No Info for AD_Table_ID=1000001 - SELECT ... [11]

Adempiere tries to look for columns that appears in the window associated to the table:

SELECT   t.ad_table_id, c.columnname, c.ad_reference_id, c.iskey,
         f.isdisplayed, c.ad_reference_value_id
    FROM ad_column c INNER JOIN ad_table t ON (c.ad_table_id = t.ad_table_id)
         INNER JOIN ad_tab tab ON (t.ad_window_id = tab.ad_window_id)
         INNER JOIN ad_field f
         ON (tab.ad_tab_id = f.ad_tab_id AND f.ad_column_id = c.ad_column_id)
   WHERE t.ad_table_id = ?
     AND (c.iskey = 'Y' OR (f.isencrypted = 'N' AND f.obscuretype IS NULL))
ORDER BY t.created DESC, c.iskey DESC, f.seqno
The following statement associates a window for tables without the association:

UPDATE ad_table
   SET ad_window_id = (SELECT MIN (ad_window_id)
                         FROM ad_tab
                        WHERE ad_tab.ad_table_id = ad_table.ad_table_id)
 WHERE tablename LIKE 'DICB\_%' ESCAPE '\' AND ad_window_id IS NULL

Window

The history button is not getting active. What should be checked?

The history button is active only if:

  • Is first tab selected
  • The window type is transaction
  • The table must have a Processed column

Development FAQ

Add an information message

ADialog.warn(WindowNo, new ConfirmPanel(),"Information message")

Where to put extensions

You should place your extensions in extend/src.
You should define at least this one as Java Sources directory. Others as well if you change standard
classes.

For PO classes:
Then respect coding conventions that can be found in M_Table.getClass(String)
Basically : compiere.model.MThisIsMyTable for a table THIS_IS_MY_TABLE

For Validation classes:
Look at ModelValidationEngine()

Define in your Client the field ModelValidationClasses with you validation classes. They must
implement ModelValidator.
Look at example MyValidator.
You can also define field level business logic using the callout mechanism. Your extension class
must implement the Callout interface and then reference in the field setup screen.

Make sure Eclipse is setup in Auto Compilation mode.

Anyway, all this is based on Reflection so the only thing to make it work is that Eclipse find the 
classes at the right place.