Closed Jackeoh closed 4 years ago
Thank you for reaching out. Your suggestion seems to be a product bug not related to the AL extensibility. Please reach out to the relevant support channels as specified in Product Support On premises - https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=93d37907-ad94-d591-22e9-593cfa09dd3f On line – read more here https://docs.microsoft.com/en-ca/dynamics365/business-central/dev-itpro/administration/manage-technical-support or contact your partner If you are a partner open a support incident through Partner Center - https://partner.microsoft.com/en-us/pcv/dashboard/overview
I'm currently loading a config package, and as part of this I require some validation code to be ran for an option field. However, the 'OnValidate' trigger is not being hit.
Debugging this I have found that during 'EvaluateTextToFieldRefOption' the FieldRef enters with the correct source value
Once the 'GetOptionNo' function runs, the FieldRef Value is changed to that of the value being input from the package.![image](https://user-images.githubusercontent.com/43955934/85767978-7647d400-b710-11ea-8bb8-b751d45029d9.png)
Therefore the input value and the field value are the same during the 'ToValidate' section, meaning that the following: if IntVar1 <> IntVar then always returns false, and therefore does not validate the option field.![image](https://user-images.githubusercontent.com/43955934/85768026-7fd13c00-b710-11ea-8597-a4bed35a4907.png)