Friday, 3 February 2012

Exception Raising

The standard method of raising exceptions in 3e is to display them in the top Exception panel - the panel shared with other item lists such as the Worklist.
Exception raised in Proforma Generation Process
To raise an exception in this way, the Exception property of the Process's underlying Object must be set to an instance of the NxApplicationException class. For example, from within the Object:
Me.Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))

Or from a Process:
Me.ProfMaster.ProformaCollection(0).Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))

The GUID value is set to the Id of a Message that describes the error.
To remove the Exception, set the Exception property to null:
Me.Exception = Nothing

No comments:

Post a Comment