18
Dear BC team,

It would be very helpful if from an extension object we can deactivate on demand the execution of standard triggers.
For example, in a table field there is some check code in the OnValidate trigger (e.g. if "Check some condition" then "Show an error message"). If we want to override this, it is not currently possible unless a publisher exists at the beginning of the "OnValidate" trigger to handle the behavior of this trigger. Since it is not possible to add "IsHandled" publishers on each and every trigger of a table and/or page, it would be very nice if from the extension object we can specify not to execute a specific trigger of the "main" object.

Just an idea on how this can be implemented, in a table extension we can skip the execution of the OnValidate trigger of a specific field with the introduction of a new property (e.g. SkipOnValidateExecutionOnParentObject).
Therefore, we can have something like that:

modify("Name of parent object field")
{
SkipOnValidateExecutionOnParentObject = true;

trigger OnValidate()
begin
//custom code for validation
end;
}

The above feature can be applied for all available triggers (OnValidate, OnLookup, OnInsert, OnAssistEdit, etc) for table and page objects.

This feature will give huge flexibility to the customization of tables and pages of Base Application and will eliminate the need for the Business Central team to add "IsHandled" publishers upon requests on several object triggers.

Thank you.
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future.

Best regards,
Business Central Team

Comments

P

This is a bit similar for the lookup event: https://experience.dynamics.com/ideas/idea/?ideaid=e3018c94-568d-eb11-8ced-0003ff45e64b

Category: Development