How to set invoice type by default?
It can be done by modifying the Detect Invoice type script rule with the code below:
if( Context.Field("InvoiceType").IsVerified )
bool isCreditNote = false;
Context.Field("InvoiceType").Field("Invoice").Value = !isCreditNote;
To edit the rule, please go to the document definition, open InvoiceType field properties, select rule "Detect invoice type" - edit, open tab "rule Settings" and press edit:
After saving changes and publishing the Document Definition, all invoice documents will be always identified as Invoices.