W068: Update material
Edits a material's header fields. Triggered from Material Detail.
Steps
-
Load the material. Call
Materials.getMaterialById. -
Check code uniqueness if changed.
-
Validate type if changed. Confirm the new
typeIdexists. -
Apply the patch. Call
Materials.updateMaterial.
Returns
The updated material.
Business rules
- Code stays unique per org.
Errors
NotFoundError. The material or the new type was not found.ValidationError. Code collision.