1 year ago

#366818

test-img

subodh

Another Process has added a "Note" Record(ProdDetail) in 22R1

I was trying to update OperationCD in AMProdOper with my ProcessStepCD. But it gives me error when I call prodDetailMaint.Save.Press();

Error: Another process has added the 'Note' record. Your changes will be lost.

   at PX.Data.PXCache`1.PersistInserted(Object row, Boolean bypassInterceptor)
   at PX.Data.PXNoteAttribute.RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
   at PX.Data.PXCache.OnRowPersisting(Object item, PXDBOperation operation)
   at PX.Data.PXCache`1.PersistInserted(Object row, Boolean bypassInterceptor)
   at PX.Data.PXCache`1.Persist(PXDBOperation operation)
   at PX.Data.PXGraph.Persist()
   at PX.Objects.AM.ProdDetail.Persist() in D:\Bld5\AC-FULLCOMMON64-JOB1\code_repo\WebSites\Pure\PX.Objects.AM\AM\ProdDetail.cs:line 310
   at PX.Data.PXSave`1.d__2.MoveNext()
   at PX.Data.PXAction`1.d__38.MoveNext()
   at PX.Data.PXAction`1.d__38.MoveNext()
   at PX.Data.PXAction`1.PressImpl(Boolean internalCall, Boolean externalCall)

It was working fine in previous release but start giving error when we move to Acumatica 22r1 release.

Please help me out

Parent Function:-

  ProdDetail prodDetailMaint = PXGraph.CreateInstance<ProdDetail>();
  prodDetailMaint.ProdItemRecords.Current = prodItem;
    <SomeDeleteCodeFromIfnotExist> //however it's not executing
    <CalledChildFunction(prodItem, formula, fg, prodDetailMaint)>;              
prodDetailMaint.Save.Press();

ChildFunction:-

        PXResultset<AMProdOper> prodOperResultSet = prodDetailMaint.ProdOperRecords.Select();

    foreach(EWPMBatchProcessStep batchStep in this.BatchProcessStep.Select()) {
         AMProdOper prodOper = FindAMOper(prodOperResultSet, amProdItem, batchStep.AMProdOperID);

       if(prodOper.OperationCD != batchStep.BatchProcessStepCD) {
         prodOper.OperationCD = batchStep.BatchProcessStepCD;
       }
   prodDetailMaint.ProdOperRecords.Update(prodOper);

acumatica

acumatica-kb

0 Answers

Your Answer

Accepted video resources