Skip to main content

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.

Database Screenshot:


 


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


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


Hi, I hope you’re doing well!

 

Maybe you can try adding a CacheAttached

pPXMergeAttributes(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