Tuesday, January 19, 2010

Global::getPrimaryKey

This method retrieves a string representation of a candidate key value of a record.
If candidade key consists of more than one field, all candidate key fields' values will be added to the result string separated by commas. If table has property CreateRecIdIndex = Yes then string representation of the RecId field value will be returned by the getPrimaryKey method.
This method should be used if you need to get unique identifier of a record of unknown type.

Here are some examples:
1) For InventTable table a string representation of the value of RecId field will be returned, like "5637144662"
2) For InventItemGroup table the value of ItemGroupId field will be returned, like "Bulbs")
3) For InventSize table the value of ItemId + InventSizeId fields will be returned, like "PB-Frame,10"

4 comments: