getnewrec check if rec exists, if not returns error code in json