How do we clear pending shop warnings on a database?
Epicor support has a fix to delete all shop warnings.
This originated because Epicor support told us it is something we should do on our system. What impact will this have on our production environment?
If you turn off shop warnings in company config it will stop generating new ones. If you run the “fix” it will delete the existing shop warnings, so you can’t see them.
Anyone have any solution here after all these years? Our log is full of crap which cannot be retrieved or removed.
Hi Rennat, were you able to get this fix? We’re in the same boat and can’t clear or load our pending warnings.
Sorry, I must read my messages. I have a simple code for moving alls shop warnings to history in SQL:
Update Erp.ShopWrn
Set CurrWarn = 0
Where CurrWarn = 1
– and LaborDtlSeq = ‘11564’ (use this for specific one)
Sets all current warnings to false. Modify as needed.
//Reference: Services -> ERP:BO:ShopWrn
CallService<Erp.Contracts.ShopWrnSvcContract>(sw =>
{
bool morePages;
Erp.Tablesets.ShopWrnTableset swTS = sw.GetRows("CurrWarn = true", 0, 0, out morePages);
List<Erp.Tablesets.ShopWrnRow> modifiedRows = new List<Erp.Tablesets.ShopWrnRow>();
foreach(var row in swTS.ShopWrn)
{
Erp.Tablesets.ShopWrnRow updatedRow = (Erp.Tablesets.ShopWrnRow)swTS.ShopWrn.NewRow();
BufferCopy.Copy(row, updatedRow);
updatedRow.CurrWarn = false;
updatedRow.RowMod = "U";
modifiedRows.Add(updatedRow);
}
swTS.ShopWrn.AddRange(modifiedRows);
sw.Update(ref swTS);
});