Context
I have built a Sales Order App and my client is currently testing it. Sorry for this long winded context but I think its important to understand what I’m trying to do.
The Client has two types of Order a Trade Order or a Commission Order and deliveries are processed slightly differently for each type. In every case a Delivery Note is received that the system must record (in a Delivery Note table)
1. When a Trade Order delivery is received, the Delivery Note is specific to a Purchase Order (raised earlier in the system) and the Delivery Note can only record deliveries for Order Items that were on the Purchase Order so the user must be restricted to only selecting the items on that PO
2. When a Commission Order delivery is received the Delivery Note can have any of the Order Items on it so the user must be able to Add any Order Item to the Delivery Note
Delivered Items are recorded in a Deliveries table which is related to the Delivery Note.
I have encountered an issue when building the form to add Deliveries to the Delivery Note which is able to deal with both use cases above.
I have a Collection with the Related Deliveries in the Delivery Note detail screen. When I click the Add Item button I want to set the visibility of two Choice components (which are working fine) on the Add form based on the Type of Order that is being processed.
1. Choice component only show the related Purchase Order items
2. Choice component shows the option to add any Order Item
When I build the form I can reference values from the Delivery Note on the screen including the Order Type (see screenshot - in this case a Trade Order)
But when I try to set Visibility for the Choice components, I am unable to reference those values. I can only reference the delivery item values which is pointless because they haven’t been set yet as the record has not been created so all the references are blank (see below)
I’m working around this by setting a variable in the User table to the Order Type when they enter the Order but I cannot figure out how to implement this visibility from the data on the Screen / Delivery Note and its beginning to drive me nuts. I’ve tried all sorts of things including custom Actions but to no avail. Interestingly when I try to invoke an action on Deliveries from the Title Bar Action only “Delivery Note” actions are available to me, not actions related to Deliveries.
Has any one encountered this limitation before and have some kind of workaround other than the way I am currently hacking it?