Using Dirty and Global Caches
When you are using the Find method to select a record, you can specify whether the Dirty and global caches should be used. With the flexibility to specify whether each of these caches should be used, you can extend the ways of using the retrieved record or retrieve a specific version of the record when it is updated by multiple graphs at a time.
Allowing the Use of the Dirty Cache
You can specify whether the Dirty cache should be used, which gives you the ability to utilize the record returned by the Find method in any place, including the Current property of the cache; you can also change the returned record.
To specify that the records marked as Dirty in the cache (that is, updated, inserted, or deleted in the cache) should be included in the query result, you should specify the PKFindOptions.IncludeDirty flag when calling the Find method. An example is shown in the following code.
shipmentEntry.Document.Current = SOShipment.PK.Find(shipmentEntry,
doc.ShipmentNbr,
PKFindOptions.IncludeDirty);