Hey Snowy,
You could use either Method or QB. You would need an action that checks Method for the highest number used so far for an invoice, then it would add 1 to that. When you go into QB, QB will check to see the number of the last invoice added and add 1 to that.
To add the action, you're going to need to loop through the table and capture the highest reference number and place it into an Action Result. From there you can do a simple math calculation to add 1 to the reference number and then insert the result as the invoice #.