The field with ID '0' does not exist in table 'PurchParmLine'.

Hye,

I am trying to post invoice through code. But i am facing an error: “The field with ID ‘0’ does not exist in table 'PurchParmLine.”
at this line :if (purchParmLine.validateWrite())

What the error message happen?