Returns a record containing fields “Reason”, “Message”, and “Detail” set to the provided values. The record can be used to raise or throw an error.
Error.Record(reason as text, message as text, detail as any) as record
|reason||The value to set the Reason as.|
|message||The value to set the Message as.|
|detail||The value to set the Detail as.|
error Error.Record("InvalidCondition","An error has occured", null) equals error with Reason: “InvalidCondition” and Message “An error has occurred”