Hi Vamsi
The problem is because maybe you are trying to update using a newrecord with RecordFactory.createEmptyRecord and trying to pass the updated values using the recordid.
The better way to do is get the record to update, then update the needed values using it and after add to the records array and execute the modifyRecordsCommand, it will fix the problem.
regards
Juan