Talk:Script ModelValidator
From ADempiere
This Wiki is read-only for reference purposes to avoid broken links.
Hi,
this is cool feature but i think it would be great if you have a syntax checker for script that user ensures script is ok, using this feature is difficult - Omdip
Some Questions
- What is meant by those supported events prefixes? It be good to have a simple line sample for each?
- Can a Script execute a document.completeIt() of a record belonging to another Org? I want to do in the case of a MoveConfirmation to automatically complete the InventoryMove (issued from). I tried to insert a simple <MMovement>move.completeIt(); in the MoveConfirmation.java (even though it got true values) but does not work i reckon due to inter-org access control.
- After some testing i think its not right to do move.completeIt() within another completeIt(). Perhaps it needs the ModelValidator.
Exercises
- I hope to do some real life cases below for others to follow.
- Creating a new Table Script Validator that will take one of the table field value and update another Table field's value.
- Just write an 'Update SQL' to do that. How do we pass the Table's value in the first place?
- exercises by red1 00:46, 1 April 2010 (PDT)