Setting a default Sales/Purch line type

Hi all, Does anyone know a simple way to make Sales or Purchase line types default to one option (ex: Item)? I’ve tried setting Type := Type::Item in the OnInsert trigger of the Sales Line table. It sort of works, but if the default is changed to something other than “Item”, once I fill in the line info and move to the next line, the first line is deleted and I must re-enter it. Not acceptable!

You better include your code in Form 47, trigger OnNewRecord - the inconvenience will be that the value of the previous line won’t be copied down but it will always be defaulted initially to that value. Saludos Nils

Thanks Nils, looks like your suggestion will work for us.