updated the invite record fetch method during code generation