public void RowDeleted(PXCache sender, PXRowDeletedEventArgs e) { int ixNote = sender.GetFieldOrdinal(NoteID); var noteId = sender.GetValue(e.Row, ixNote); // if the main table uses DeletedColumn, do not remove the records? PXDatabase.Provider.Delete(typeof(ExtraFieldValue), new PXDataFieldRestrict <ExtraFieldValue.noteId>(noteId), new PXDataFieldRestrict <ExtraFieldValue.extFieldId>(attributeId) ); }
public override void RowDeleted(PXCache sender, PXRowDeletedEventArgs e) { }
protected override void ARTran_RowDeleted(PXCache sender, PXRowDeletedEventArgs e) { base.ARTran_RowDeleted(sender, e); if (((ARTran)e.Row).InventoryID != null) { if (((ARTran)e.Row).LineType != SOLineType.Discount) DiscountEngine<ARTran>.RecalculateGroupAndDocumentDiscounts(sender, Transactions, DiscountDetails, Document.Current.CustomerLocationID, Document.Current.DocDate.Value, Document.Current.SkipDiscounts); RecalculateTotalDiscount(); } ARTran siblings = PXSelect<ARTran, Where<ARTran.sOOrderType, Equal<Required<ARTran.sOOrderType>>, And<ARTran.sOOrderNbr, Equal<Required<ARTran.sOOrderNbr>>, And<ARTran.sOShipmentType, Equal<Required<ARTran.sOShipmentType>>, And<ARTran.sOShipmentNbr, Equal<Required<ARTran.sOShipmentNbr>>, And<ARTran.tranType, Equal<Required<ARTran.tranType>>, And<ARTran.refNbr, Equal<Required<ARTran.refNbr>>>>>>>>>.SelectWindowed(this, 0, 1, ((ARTran)e.Row).SOOrderType, ((ARTran)e.Row).SOOrderNbr, ((ARTran)e.Row).SOShipmentType, ((ARTran)e.Row).SOShipmentNbr, ((ARTran)e.Row).TranType, ((ARTran)e.Row).RefNbr); if (siblings == null) { SOOrderShipment ordershipment; if ((ordershipment = PXSelect<SOOrderShipment, Where<SOOrderShipment.orderType, Equal<Required<SOOrderShipment.orderType>>, And<SOOrderShipment.orderNbr, Equal<Required<SOOrderShipment.orderNbr>>, And<SOOrderShipment.shipmentType, Equal<Required<SOOrderShipment.shipmentType>>, And<SOOrderShipment.shipmentNbr, Equal<Required<SOOrderShipment.shipmentNbr>>>>>>>.SelectWindowed(this, 0, 1, ((ARTran)e.Row).SOOrderType, ((ARTran)e.Row).SOOrderNbr, ((ARTran)e.Row).SOShipmentType, ((ARTran)e.Row).SOShipmentNbr)) != null) { shipmentlist.Delete(ordershipment); } } if (SODocument.Current != null) { SODocument.Current.IsTaxValid = false; if (SODocument.Cache.GetStatus(SODocument.Current) == PXEntryStatus.Notchanged) SODocument.Cache.SetStatus(SODocument.Current, PXEntryStatus.Updated); } if (Document.Current != null) { Document.Current.IsTaxValid = false; if (Document.Cache.GetStatus(Document.Current) == PXEntryStatus.Notchanged) Document.Cache.SetStatus(Document.Current, PXEntryStatus.Updated); } }