Harjo
August 7, 2007, 4:56pm
1
Hi, I have this,
var vRecord = foundset.getRecord(foundset.newRecord())
this will give me the record as an object, very handy to pass thru to other methods as an argument.
But how can I delete this record, when I only have this object??
vRecord.deleteRecord()
does not work!
I have stumbled about that, too. You can only delete by index. So this would work:
var vNewRecordIndex = foundset.newRecord()
vRecord = foundset.getRecord(vNewRecordIndex )
foundset.deleteRecord(vNewRecordIndex)
Harjo
August 7, 2007, 5:07pm
3
yeah, but in the meanwhile the foundset can be changed, so I don’t have that index!
I think if your foundset is not “safe”, your record variable isn’t either.
Harjo
August 7, 2007, 5:33pm
5
yes it is, it’s just an object of the record itself, not via an index or so!
but i think I have found something!, I will post it, when I have tested it.
A record variable doesn’t live forever. If you change your foundset, your record might “die”. That’s what I meant. If you don’t touch your foundset, the record is fine, but then, so is the index…