You'll need to do an insert (or update, I believe) in order for getLastInsertId()
to return a value. Could you paste more code?
If you're calling that function from another controller function, you might also be able to use $this->Form->id
to get the value that you want.