related record check
I have a simple problem but experiencing brain freeze.
I have a table called invoice details. I have another occurance of this table called Deposit link. The point is, when an invoice details record is created, I want another "duplicate' invoice details record to be created - one is for a deposit amount, the other for the main invoice.
I want to create a script that will check whether or not the balance in the deposit link record is 0. The field is called balance_due
From invoice details, how should I write the script? Do I use a GTRR or a set variable? The two occurances are linked using a field called 'link'. They both contain the same serial number on creation of deposit invoice...