By Philippe Bonneau on
7/30/2013 8:39 AM
After debugging some code, in order to know why the methods
CSRInstrument::GetInstance and
gApplicationContext->GetCSRInstrument returned
null in some cases, I discovered that the method CSRInstrument::MultiSave was used badly. In this case, the instrument was duplicated using the Clone method, setting the instrument code using the SetCode to 0, and using reserveCode in relationship with GetNewCode. The insertion into database was done using the CSRInstrument::MultiSave with a pmModification flag.