I looked at that code but it's wrapped in an IF statement that prevents the creation of a new key if one already exists. If the business objects New() method is fired the first thing that happens is the table should append a blank; "lnRetVal = this.oBehavior.New()". If the NewID function is part of that table then a key will already be created. In order to get to the line of code "=SETFLDSTATE(lcPrimaryKey, 3)" in the OnNew method something had to fail.
Stonefield was causing my problem because I had overlooked the SDT property "View field property inheritance". So I discovered yesterday that a lot of my views were making double calls to the NewID function.
Thanks,
Bill
William Hartgrove
Senior Elephant Waxer
Hartgrove Amusent Park and Youth Hostel
Austin, Texas