I'm creating a BO TourBookings that dynamically needs to update a sales price based on the Agent that makes the Booking. TourBookings has a field TourBookings.Agent that is linked to the Agents table, but it can also be undefined, meaning that it is a direct booking. I have the following dynamic rule defined:
IF TourBookings.Agent WAS CHANGED TO DEFINED Then TourBookings.SalesPrice = TourBookings.Agent.SalesPrice
Whenever I change the Agent on the TourBookings form it updates the SalesPrice dynamically and this works correct.
However when I change TourBookings.Agent to UNDEFINED I want to restore the RetailPrice to the SalesPrice. For that I have created following dynamic rule:
IF TourBookings.Agent WAS CHANGED AND TourBookings.Agent IS UNDEFINED Then TourBookings.SalesPrice = TourBookings.RetailPrice.
The above rule however is not executed as the rule evaluation reports that TourBookings.Agent WAS CHANGED evaluates to FALSE, but TourBookings.Agent IS UNDEFINED evaluates to TRUE.
I also tried to achieve the above by using the following condition:
IF Agents WAS REMOVED FROM TourBookings.Agent
This also evaluates to FALSE.
Is this a bug or am I doing something wrong?