How to add consulting item to Invoices screen (SO303000) when creating Invoices from Prepare Invoices
I want to add non stock consulting item(See below figure) to invoices screen details tab when creating prepare invoice from shipments screen. I tried override shipment screen “CreateInvoice” action as well as fire Row Persisted event and override Persist method in Invoices screen too but unbale to do. I saw when fire Row Persisted event or override Persist method just executing(looping) no end point. Please give me any answer or suggestions.
Page 1 / 1
HI @Lalith
I’m not sure I am understanding what you are asking, but I was able to add a line item after the shipment was created similar to what you did.
Can you possibly explain more please?
Hi @kbeatty21
I want to add a line item after Invoice is created.
Hi @Lalith
Line Item can be added once an invoice is in balanced status not possible after release.
Thank you
Hi @manikantad18
Thank you your respond.
Yes I want to add line item, the invoice is in balanced status but automatically. That’s why I tried to use Row Persisted event in the invoice. The problem is event executing continuously.
Hi @Lalith
Are you talking about Automation schedules releasing the invoice?
@kbeatty21
My code was below. see it. It is working but this event continuously running. I want to stop that only one line item added to that graph.
protected void ARInvoice_RowPersisted(PXCache cache, PXRowPersistedEventArgs e) { var row = (ARInvoice)e.Row; if (row == null ) return;
if (e.TranStatus == PXTranStatus.Completed) {
InventoryItem inventoryItem = new PXSelect<InventoryItem, Where<InventoryItem.inventoryCD, Equal<Required<InventoryItem.inventoryCD>>>>(Base).Select("ITEM1");
To do that process I tried handle Row Persisted or Persist(), but that event and method continuously looping. This Invoices screen not like other screen. Same thing I have done when create shipment. That was fine.
Can you give a solution to exit from a event which continuously looping or any method which I want to save my nonstock item ASAP.
@Naveen Boga do you know any solution?
Hi @Lalith - were you able to find a solution? Thank you!