Auto insert a record in master detail

Hi, i have a form master-detail for a invoice, and i need when the user enter codebar in the grid detail, its insert automatily the new record. like a POS.
It is possible in SC?