Hi guys!!
I was trying to post invoice for purchase order, and when i run the code no error was appear, but when i look into the purchparmline table no record was found. I doubt this line is the cause of the problem "purchParmLine.initFromPurchLine(purchLine); " because if i delete this line i am able insert the record into the table. But i have have to use this line in my code. Can someone explain to me how to solve the problem.
…
if (purchParmLine.ReceiveNow)
{
purchParmLine.ParmId = purchParmUpdate.ParmId;
purchParmLine.initFromPurchLine(purchLine);
purchParmLine.setLineAmount();
//purchParmLine.setQty(DocumentStatus::Invoice,false, true);
purchParmLine.TableRefId = tableRefId;
if (purchParmLine.validateWrite())
purchParmLine.insert();
else
throw Exception::Error;
}
…