I am using the UD14 form and grid to be able to do some edit on a few columns. During my form load, I do a GetUD14Data (4sec) and a BAQDynamicQuery retreive from the OrderRel (6sec) So far all is good.
But I need to reduce the UD14 list to the records list from edvBAQ. So I compare records from both edv in order to reduce the UD14 records. (To only show valid ones)
My current setup is by using a foreach records in edvBAQ, search the corresponding record in edvUD14 using another foreach.
This double foreach is my issue as it takes over 2 minutes.
I am sure there is another and faster way to acheive this. Currently, the relationship between the two are composed of 4 fields. I am now able to use only one field as as soon I do a save into UD14, if a new record is created, I am saving a unique ID which I save back in OrderRel table. This Id is saved in UD14.Key3. and in OrderRel is in DemTrspNum_c.
Could I use Foreign Key Value to acheive this? I must admit never have used this, I have tried to add a a FKV but I do not see the fields … I want the parent to be UD14 and use the Key3 …but I do not see it in the fields list.
Or maybe there is another way to get the search done ?
Thanks
EDIT:
I have tried to use a Updatable BAQ, but I am unable to set it up, keep getting errors. Key1 to 5 are strings… so it means not possible?
To help others help you - can you summarise what you are trying to achieve ? What is the business problem?
Ultimately it feels like you are taking the wrong approach you really want to keep your logic and reconciliation on the server side.
Leverage a BPM or Function to compute what you need. An uBAQ is also an option. Your UI is for data entry and or presentation.
BackGround.
Provide CS with a dashboard showing each delivery not yet fulfilled, Group by OrderRel.OrderNum, OrderRel.Plant, OrderRel.ReqDate) and OrderRel.ShipViaCode. and provide total Volume, Weight and truck footage needed in the truck.
In order to provide this I am using UD14 to uniquely identify the grouped combinations.
Each records in UD14 is a unique combination of the previous 4 fields. Whenever a change in date occurs in a release, if the new date + the 3 other records are not in UD14, a new record is created. Comments from the previous are copied to the new one.
All this for what? To keep updatable info (comments, confirmations, etc) per shipping. (which a shipping is all releases of an order shipping the same date, by the same shipper)
So I had the brillant idea to use the UD14 to keep the unique shipping info of the Grouped releases.
My form, in order to show only relevent UD14 records to edit, I compare with my BAQ records which contains all the records that should show. Thus the double foreach.
Using an updatable query (where I get the same results ) would be super but I do not get it to work.
We are on 10.2.300. would love to use functions but not avail…!