You can run commands when a client is started (check the sysStartupCmd classes),
When wanting to clear dynalinks between two forms, you can clear the dynalinks on the DS on the second form. See example below.
Clear DynaLinks public void init() { ; super(); if (element.args() && element.args().caller() && (element.args().caller().name() == formStr (PurchTable))) { InventTable_ds.query().dataSourceTable(tableNum(InventTable)).clearDynalinks(); } }