Hi,
IDEA: generate Entity.AfterScript after button is pressed
The script is:
function TntButton1OnClick ()
{
var Log = System.CreateObject(‘Log’);
Log.Information (“Button - START”);
Log.Information(Entity.Name);
Log.Information ("Script before change: " + Entity.AfterScript);
// new value
Entity.AfterScript = "select * from " + Entity.Schema.Name + “.” + Entity.Name + “;”;
Log.Information ("Script after change: " + Entity.AfterScript);
Log.Information (“Button - END”);
}
Message Explorer messages:
1 | 2009-01-22 16:34:08 | Script has been finished | | 1005 | 1 | 3672| 1
2 | 2009-01-22 16:46:09 | Button - START | | 1002 | 1 | 5528| 2
3 | 2009-01-22 16:46:09 | TST_AK_DANE_PRODUKTY | | 1002 | 1 | 5528| 2
4 | 2009-01-22 16:46:09 | Script before change: – NO SCRIPT
– NO SCRIPT at ALL
| | 1002 | 1 | 5528| 2
5 | 2009-01-22 16:46:09 | Script after change: select * from DB2TEST.TST_AK_DANE_PRODUKTY; | | 1002 | 1 | 5528| 2
6 | 2009-01-22 16:46:09 | Button - END | | 1002 | 1 | 5528| 2
It seems to be O.K. but …
AfterScript was not changed (!!!) - images attached.
What error I’ve done ?
Adam