Skip to main content
Solved

ToLocationID field not found in POReceiptLineSplit data class


I’m building a GI and need the ToLocationID data field from the POReceiptLineSplit data class.

However, when I click on the POReceiptLineSplit link, that field does not exist in that data class. Am I missing something? How can I access it for my GI?

 

 

Best answer by dcomerford

@dmillette Ok believe I have worked it out the ToLocationID is not in that file you will need to join the following tables to your POReceiptLineSplit to get what you need as the ToLocationID is in the the InTran (transfer) (i attached my sample GI and the result is correct)

 

View original
Did this topic help you find an answer to your question?

4 replies

dcomerford
Captain I
Forum|alt.badge.img+15
  • Captain I
  • 596 replies
  • November 7, 2023

Can you show me the screen you inspected the element above on?


  • Author
  • Freshman I
  • 5 replies
  • November 7, 2023

In Put Away mode on this screen:

 

 


Forum|alt.badge.img+4

This appears to be related to WMS and specifically screen PO302020.  First some technical “digging” and then I’ll try to explain.

Technical Details

According to the ASPX page, this screen uses PX.Objects.PO.WMS.ReceivePutAway+Host.  

<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" TypeName="PX.Objects.PO.WMS.ReceivePutAway+Host" PrimaryView="HeaderView">

PutAwayMode.cs contains the following which looks like it probably is the right spot in code, although admittedly, this isn’t something I’m familiar with.

using WMSBase = WarehouseManagementSystem<ReceivePutAway, ReceivePutAway.Host>;

public partial class ReceivePutAway : WMSBase
...

According to PutAwayMode.cs, it looks like ToLocationID from INTran is programmatically added to POReciptLineSplit by way of some more fancy code.

public class ToLocationID : FieldAttached.To<POReceiptLineSplit>.AsInteger
...
var links =
	SelectFrom<POReceiptSplitToTransferSplitLink>.
	InnerJoin<INTran>.On<POReceiptSplitToTransferSplitLink.FK.TransferLine>.
	Where<POReceiptSplitToTransferSplitLink.FK.ReceiptLineSplit.SameAsCurrent>.
	View.SelectMultiBound(Base, new[] { row })
	.AsEnumerable()
	.Cast<PXResult<POReceiptSplitToTransferSplitLink, INTran>>()
	.ToArray();
...
state = PXFieldState.CreateInstance(
	value: state.Value,
	dataType: typeof(string),
	isKey: false,
	nullable: null,
	required: null,
	precision: null,
	length: null,
	defaultValue: null,
	fieldName: nameof(INTran.toLocationID),
	descriptionName: null,
	displayName: state.DisplayName,
	error: null,
	errorLevel: PXErrorLevel.Undefined,
	enabled: false,
	visible: Base.WMS.Header.Mode == PutAwayMode.Value,
	readOnly: true,
	visibility: PXUIVisibility.Visible,
	viewName: null,
	fieldList: null,
	headerList: null);
return state;

Short Version

Ok, so using these breadcrumbs, you want to add the DAC’s POReceiptSplitToTransferSplitLink and INTran.

POReceiptSplitToTransferSplitLink contains:

[CompanyID]
,[ReceiptType]
,[ReceiptNbr]
,[ReceiptLineNbr]
,[ReceiptSplitLineNbr]
,[TransferDocType]
,[TransferRefNbr]
,[TransferLineNbr]
,[TransferSplitLineNbr]
,[Qty]

You will link POReceiptLineSplit to POReceiptSplitToTransferSplitLink by the Receipt* fields and then connect INTran via the Transfer* reference fields.  This is when you should be able to use INTran.ToLocationID that you need.


dcomerford
Captain I
Forum|alt.badge.img+15
  • Captain I
  • 596 replies
  • Answer
  • November 7, 2023

@dmillette Ok believe I have worked it out the ToLocationID is not in that file you will need to join the following tables to your POReceiptLineSplit to get what you need as the ToLocationID is in the the InTran (transfer) (i attached my sample GI and the result is correct)

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings