Access master model data from the detail create form #250
-
I have a model with Orders, OrderItems and Products. On the Order form, I have an OrderItem list with create/update options. In the OrderItem create/update form, I can select from the Products list. So far everything is simple and works well. Now I have the following request. The product price, which should be on the OrderItem form automatically updated after a product change, is based on the currency. And this currency is saved in the Orders model, there is one currency for all order items. I tried to solve it, as usual for such lookups, by using the definition
and the I have a feeling that the problem should be solved somewhere in the controller, which has access to the whole form including Order fields, I can't think of any solution. Any idea? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Are you using a relation controller to create the OrderItem, and you're looking to get the Order ID from the OrderItem create form? This should be easy enough by looking directly at the values sent over the AJAX request, although that won't work as well if the Order record itself doesn't exist prior to the OrderItem being created. |
Beta Was this translation helpful? Give feedback.
Are you using a relation controller to create the OrderItem, and you're looking to get the Order ID from the OrderItem create form? This should be easy enough by looking directly at the values sent over the AJAX request, although that won't work as well if the Order record itself doesn't exist prior to the OrderItem being created.