Pages

Wednesday, February 17, 2010

It is possible for users to edit the Item reference fields of sales order lines and purchase order lines.


It is possible for users to edit the Item reference fields of sales order lines and purchase order lines of a user adds these fields to the forms.
Hopefully no adventurous end users read this post.

Repro:

  1. Open Sales Order Details
  2. Go to Lines / Other
  3. Select one the Item reference fields
  4. Note that you cannot change the values
  5. Right click in the form and select Setup
  6. Select the Line / TabLine/Lines/SalesLineGrid node
  7. Click Add fields
  8. Expand Order lines
  9. Select for example the Reference number (InventRefId) field
  10. Close the selection form
  11. Close the User setup form
  12. Observe that the Reference number field is now added to the grid, and you can edit it.

Obviously if you tamper with the references of the lines, you will destroy the integrity between the references entities, links are broken, and subsequent actions will not perform as expected.

You should lock these fields on datasource field level by setting the AllowEdit property to No. Maybe you should even consider setting the AllowEdit property to No on the table level. I'm not sure if the later suggestion causes any problems elsewhere in the application, but I can't imagine a place where you'd want users to edit these fields manually.

Here are the fields where you should set AllowEdit=No if you want a fix at table level:
AOT > Tables
  • SalesLine > Fields >
  • InventRefTransId
  • InventRefType
  • InventRefId


  • PurchLine > Fields >
  • InventRefTransId
  • InventRefType
  • InventRefId

No comments: