samantha73 wrote: »So my question is after creating a new field via extension do you still have to create the update logic similar to codeunit "Sales Inv. Header - Edit" or can you make the field editable only. Making the custome fields editable did not work
Answers
That codeunit is to edit data from posted documents as the codeunit has the permissions:
Permissions = TableData "Sales Invoice Header" = rm;
If you want to add a new field to sales order you would need to create an extension for it.
If you are trying to edit posted invoice then yes, you need to create a similar codeunit as codeunits can't be extended, or looking into the standard code there is an event publisher you can use:
OnRunOnBeforeAssignValues(SalesInvoiceHeader, Rec);
I wouldn't recommend to allow editing posted documents at all apart from what BC standard offers.
In your original question you were talking about a sales order, this is an unposted document.
You may need to clarify your question.