I'm struggling with BeanShell scripting in ADempiere.
Outside of some return statements and some strings, nothing really works the way it should.
I'm a Java/Objective-C programmer and even if I am used to Java, BeanShell is making me to pull my hairs out.
I read the scripting tutorial on the ADempiere Wiki page, but I don't understand how to use the prefixes, the ones with the W_'s, G_'s, A_'s and the rest of the A_'s: A_WindowNo, A_Tab, A_Field, A_Value, A_OldValue, A_Ctx.
I tried this to retrieve some data, but it doesn't work:
- Code: Select all
return "Validation... Color: " + A_Tab.getValue("COLORNR");
where COLORNR is a column in my database. It doesn't find the A_Tab.
Could someone explain how to call a method and how to use the prefixes, because the documentation is very poor... unfortunately.
Thank you !