Question

Inventory Receipt not pulling description from sales order

  • 21 September 2023
  • 7 replies
  • 89 views

Hello Experts,

We have a client request to display the sales order description on both the Inventory Issue and Inventory Receipts screens.

We've successfully implemented the description display on the Issue screen, but we're facing issues when trying to create receipts from a sales order. Even for existing orders, the description isn't showing up on the selected row.

Please refer to the attached screenshots for details from both the database and debugging:

In Database:


In Debug:

 

We would greatly appreciate any assistance with this matter.

Here's the code we're using for both screens, as they share the same DAC (INRegister):

For the Issue screen, we're using the RowPersisting event. For the Receipts screen, we're using the RowSelected event.

 var row = (INRegister)e.Row;
if (row == null) return;

var soDescription = PXSelect<SOOrder,
Where<SOOrder.orderNbr, Equal<@P.AsString>>>
.Select(Base, row.SOOrderNbr).TopFirst;

cache.SetValue<INRegister.tranDesc>(row, soDescription?.OrderDesc);

Thank you in advance!
Kumar Dighe.


7 replies

Database Screenshot:

 

Userlevel 3
Badge

Hi,

First of all It is not a good practice to Write the logic in RowSelected Event Handler,   Do you Want to Display Sales order Description to the existing Receipts?

 

Hi @Atiq,

Thank you for your response.

I used the RowSelected Event just for debugging purposes, but I encountered this issue. If you have any suggestions or steps that I can follow to achieve this, it would be greatly appreciated.

Thank you.
Kumar Dighe

Userlevel 3
Badge

Please write the code to in the FieldSelecting event, it should work

Userlevel 1

Hi, I hope you’re doing well!

 

Maybe you can try adding a CacheAttached

[PXMergeAttributes(Method = MergeMethod.Append)]
[PXFormula(typeof(Selector<INRegister.sOOrderNbr, SOOrder.orderDesc>))]
[PXFormula(typeof(Default<INRegister.sOOrderNbr>))]
public virtual void _(Events.CacheAttached<INRegister.tranDesc> e){}

 

HI @lgalleno31@Atiq Thank you for your response.

I reviewed this case last Friday and observed that the SOOrderNbr is empty for Inventory Receipts because IN Receipts are based on Purchase Orders.

I will inquire with the client about how they establish the link between Sales Orders and Receipts. If any questions arise, I will reach out to you for further assistance.


Regards,
Kumar Dighe.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved