static void Job4(Args _args)
{
CustTable custTable;
FieldId fieldId;
;
fieldId = fieldNum(CustTable, AccountNum); // This could be passed as a method parameter
select custTable; // Get first record
print custTable.(fieldId); // Print account number
select custTable
where custTable.(fieldId) == '1101'; // Where clause based on field ID
print custTable.Name;
pause;
}
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(); } }