I have a View with a data source of the shipment table. This view has a method that contains a query. This query takes a shipment id and returns the sales id from the sales line table for this shipment. This view has a computed field that is the output of the query. The computed field is then used on a form.
If I hard code the shipment id the process works correctly. My question is how do I get the shipment id dynamically from a list of shipment ids. For instance, I have a form that lists all shipments. I want to place a field next to the shipment id that contains the calculated sales id from the process above.
Bottom line: I want the first column of a grid to be a shipment id and the second column to be the sales id for the shipment in the first column.
This is an example of the method described above that contains the query:
private static server str findSalesLine()
{
WMSShipment wmsShipment;
WMSOrderTrans wmsOrderTrans;
SalesLine salesLine;
select wmsShipment
join wmsOrderTrans
where wmsShipment.shipmentId == '1040383'
&& wmsShipment.shipmentId == wmsOrderTrans.shipmentId
join salesId from salesLine
where salesLine.LineNum == wmsOrderTrans.inventTransRefLineNum
&& salesLine.SalesID == wmsOrderTrans.inventTransRefID
&& salesLine.ExternalItemId != '';
return salesLine.SalesId;
}
WHSShipmentTable) already contains the sales id in fieldOrderNum(see relationSalesTableon that table). - FH-Inway