Currently the templates adds and removes an "IsCreate" and "IsUpdate" property to the erp material in multiple parts. Those are only used to bind some elements in the item tabs.
Issue
Dynamically adding and removing properties makes code less robust, because a programmer needs to be aware that the object they are working with might change in different execution paths
This makes it impossible to implement #210 as Edit-ResponseWithErrorMessage should return a single datatype and entity might be null, which would cause the Add-Member calls to fail
Analysis
The material tab uses an empty material on create, so it isn't possible to check whether material exsits or not
Possible solution would be to create a materialdatacontext that contains the entity and also an IsCreate or IsUpdate property. It isn't necessary to have both because it can be deducted that it is an updatematerial if it isn't a create material.
Description
Currently the templates adds and removes an "IsCreate" and "IsUpdate" property to the erp material in multiple parts. Those are only used to bind some elements in the item tabs.
Issue
Analysis
Related Issues