Workflow

How to Create and Delete a Stock Unit

Verified end to end. A disposable stock unit was created from the Units support file, verified in the list, deleted through the row action, and confirmed absent after cleanup.

Evidence Summary

Workflow run
stock-units-crud-20260520T110034Z
Route
/stocks/apoio/unidades
Disposable unit
Z00 / AI Unit 20260520T110034Z
Final state
Deleted; final table search returned No matching records found

Create a Unit

  1. Open /stocks/apoio/unidades.
  2. Click Nova Unidade.
  3. Fill Cod.Unidade and Designação.
  4. Click Guardar.

The verified form is fnewdireccion and posts to /stocks/apoio/unidades. The payload used gfnewunidad=, CodUnidade=Z00, and Designacao=AI Unit 20260520T110034Z. The unit code field has maxlength 3; the code is the durable key used by the list and delete action.

Verify the Unit

The units grid is ListaUnidades. It loads through DT_Select with table=unidades, order=CodUnidade, and columns CodUnidade, Designacao.

After creation, filtering the grid by Z00 returned the visible row Z00 / AI Unit 20260520T110034Z.

Delete the Unit

  1. Filter the units grid by the unit code.
  2. Click the row delete action.
  3. Confirm the prompt Tem a certeza que quer apagar? with OK.

The delete action calls ajaxserver with action=deleteUnidade and codUnidade=Z00. After confirmation, reloading the page and searching for Z00 returned No matching records found.

Use and Boundaries

Units are support-file values used by articles and document lines. Deleting a unit that is already used by live articles or historical documents may fail or leave existing records referencing the old code, so cleanup testing should use a disposable code that has not been assigned elsewhere.

Artifacts