
Greetings! I have a request for direction on a project I'm working on.
We have a Customer PO# on our Sales table and we have that added on the production order list. Now, today, I'm adding a PO# to transfer orders and am creating production orders from a transfer order line. Production orders are creating fine, but the issue is combining the two PO columns into one column on the grid. Example would be 1 record in the grid was created from an SO so the PO# column would need to come from the SO header, but the next production order was created from a transfer line and the PO# column would need to come from the Transfer order.
I could easily accomplish this with a display view, but the requirement is for it to be sortable and filterable. I think I could also do this by creating a query and then using computed columns in a view and adding the view as a data source. I just feel like this would add a lot of overhead and kill performance on the form.
Does anyone have any suggestions of a path to take? I'm drawing a blank.
*This post is locked for comments
I have the same question (0)Hi I'm a little confused, which grid are you having trouble with? I'm guessing the ProdTable grid. I'll suppose that you have a field added named something like CustomerRef (based on same EDT) and you populate this when creating the production order.
You can write the logic in a method on the ProdTable in the initValue method so you will be able to determine the args.record() or args.caller() and act accordingly.
Alternatively if your code is creating the production order then create two separate methods on ProdTable called initFromTransferOrder and initFromSalesOrder then based on the same args object values call the relevant method which will set the CustomerRef value correctly.
I'd also look at adding a field which linked back to the creating object for completeness.