Pages

Sunday, February 21, 2010

Free ebook: Understanding Microsoft Virtualization Solutions (Second Edition)

Mitch Tulloch has updated his free ebook of last year; it’s now updated for Windows Server 2008 R2. You can now download Understanding Microsoft Virtualization Solutions, From the Desktop to the Datacenter in XPS format here and in PDF format here.

Six chapters adding up to 466 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

Friday, February 5, 2010

Datasource names on Data Sets used for custom lookups on Enterprise Portal

When creating lookups based on a User Control in the AOT, it seems required that you, in the query of the dataset, make sure the datesource name and table name is exactly the same for each datasource.

Normally you would be able to name the datasource differently from the table it represents, but the EP frameworks can't figure this out when you apply custom filters from the webpage.

It fails when applying the filter, being unable to update the query on the dataset.

Sorting of versions shown in the Compare tool, when using MorphX version control, is not correct

When using the Compare tool from an AOT node in a system with MorphX version control enabled, the order of historical versions for the object is not shown as intended.

The Compare tool is intended to show the first version and the twenty latest versions of the object. In this case however you get the twenty first versions. This is because the Compare tool uses the change numbers of the object to figure out the sorting, but the change number with MorphX version control is always 0.

To fix this, make the following change to \Classes\SysTreenodeCompareContext\comparableListTreenode, lines 110-111:

while select item
    order by ChangeNumber desc, Version asc
with
while select item
    order by ChangeNumber desc, Version desc
This is obviously just a quick fix, but will work as intended until Microsoft fixes the bug.