IsCommitted - DataDictionary
Called to determine if the record is committed
Type: Function
Return Data Type: Boolean
Syntax
Function IsCommitted Returns Boolean
Call Example
Get IsCommitted to BooleanVariable
Description
Called to determine if the record is committed (see Commit Field_Option).
By default, IsCommitted is true if the record is saved. This can be augmented to change the definition of committed for a record. This can be augmented, but will often require no changes.
So consider the following DD:
Object OrderHea_DD is a OrderHea_DataDictionary
Set DDO_Server to Customer_DD
Set DDO_Server to SalesP_DD
// allow null parent for sales-person (would normally be set in the dd class)
Set ParentNullAllowed SalesP.File_Number to True
// If committed order, don't allow customer to be changed (would normally be set in the dd class)
Set ParentNoSwitchIfCommitted Customer.File_Number to True
// Once committed, we don't want to be able to change ordered by (would normally be set in the dd class)
Set Field_Option Field OrderHea.Ordered_By DD_COMMIT to True
End_Object
This would allows the salesperson to be null, disallow switching customers after the order is saved and disallows changing the value of Ordered-by once saved.
Sample
This sample shows you how to check if a record is committed, allowing you to do whatever you wish if it is.
Boolean bComitted
Get IsCommitted to bCommitted
If (bCommitted) Begin
// ... do something
End
See Also
ParentNoSwitchIfCommitted | IsCommittedParentChangeAllowed | AllowParentFind
Return Value
True if committed, False if not committed