OK I figured out one way to do it- Starting with
this example I created a custom bizform. Then I added an attribute to the .ascx markup OnOnBeforeSave="viewBiz_SetGUID". In the codebehind my method for viewBiz_SetGUID looks like this:
protected void viewBiz_SetGUID()
{
string aguid = Guid.NewGuid().ToString();
if (this.viewBiz.BasicForm.FieldControls.ContainsKey("AGUID"))
{
this.viewBiz.BasicForm.DataRow["AGUID"] = aguid;
}
}
(Note: "AGUID" is the name of my GUID field on my BizForm.)