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 - were you able to find a solution? Thank you!
My target is like this.
So, all you know we can create Invoices from the shipment screen by using “Prepare Invoice” action.
When means actually after creating a Invoice from that scenario, Just I want to add a special non-stock item which was created invoice.
There fore firstly I created a object and set that item to created object and save to the Invoice graph. The code is below.
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?
@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");
Are you talking about Automation schedules releasing the invoice?
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
Line Item can be added once an invoice is in balanced status not possible after release.
Thank you
Hi @kbeatty21
I want to add a line item after Invoice is created.
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.