Examples: Required property

In the following example, an event procedure for the save button saves DUOS data objects in the Customer Maintenance window only if the user entered all required fields (the Required property is True):

Private Sub Save_BeforeUserChanged(KeepFocus As Boolean, _
CancelLogic As Boolean)
	Dim CustomerCollection As DUOSObjects
	Dim CustomerObject As DUOSObject

	If CustomerMaintenance.Required = True Then
	'The user entered all required fields. Create/get the collection
		Set CustomerCollection = DUOSObjectsGet("CustomerCollection")
		'Create the object, using the customer ID as the object ID
		Set CustomerObject = CustomerCollection.Item(CustomerID)
		'Set the properties in the collection
		CustomerObject.Properties("URL Address") = URLAddress
		CustomerObject.Properties("Contact E-Mail Address") _
		= ContactEMailAddress
	End If
End Sub

Documentation Feedback