Is it possible to set up auto generate numbers for 2 different invoice transaction?
Auto generate numbers for intercompany and non intercompany transaction.
I assume you mean you want the numbering scheme to be different for trade invoices vs interco invoices.
This is not possible.
you can add a custom header field to define intercompany transaction or customer transaction. Source the field from customer name and check against the intercompany customer list – which can define what type of transaction it is. You could go a bit further by using formula to add prefix and suffix based on customer type
Is it not possible to override the number when creating the invoice using suitescript?

Well, that’s a tricky subject.
The short answer is that yes, you could do this. You can enable Transaction Number generation override, which will then allow you to specify anything you like.
However, this opens to the door to some risk. While the functionality is offered, NetSuite does not recommend making use of transaction numbering override. I have seen many unintended consequences of using this feature, including things that are simply bugs.
I have seen Invoices get generated without a transaction number at all. Obviously, fairly troubling. I have seen custom-provided numbers confuse the native auto-numbering and cause the next number to jump out of sequence, leading to audit problems.
So my personal recommendation is not to mess with the transaction numbering unless this is somehow business-critical for your organization. There are other existing means to very easily identify interco vs trade orders that can be built into searches and reports.
Thanks for your detailed reply. I would like to know other options to differentiate interco vs trade orders. Pls suggest if any.