Skip to main content
Answer

Is there a way to remove this Inserted cache

  • July 29, 2024
  • 1 reply
  • 96 views

Hi,

I need to remove this Inserted cach while keeping the Updated cach as it is.

Is there any way to achive this?

Thanks.

 

 

 

Best answer by Dmitrii Naumov

I think you can do something like 

foreach(var record in cache.Inserted)

{

 cache.SetStatus(record, PXEntryStatus.NotChanged);

}

 

But I’d rather recommend you to change the logic that actually inserts the record, as this looks more like a hack/crutch rather than proper code (at lest without having all the contexts it looks this way). 

1 reply

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • July 29, 2024

I think you can do something like 

foreach(var record in cache.Inserted)

{

 cache.SetStatus(record, PXEntryStatus.NotChanged);

}

 

But I’d rather recommend you to change the logic that actually inserts the record, as this looks more like a hack/crutch rather than proper code (at lest without having all the contexts it looks this way).