AL icon indicating copy to clipboard operation
AL copied to clipboard

Notification with Actions for Errors

Open ik3ras opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe. Current implementation of Error messages stops all user actions, requires a page refresh or revalidate input if possible. The better way of handling was implemented in incoming documents, where all errors are collected and shown in seperate page part with some availability to go to some page.

Describe the solution you'd like Notifications currently allow to add custom actions. It would be good way to implement error notfications, where error notification still rolls back the transaction, but allows for custom added actions where user could fix the couse of error by just choosing the action if available. To extend even further it would be great to collect these error notifications before throwing them and stopping transaction.

Describe alternatives you've considered Alternatives are implemented in incoming document functionality, but it does not allow to add custom actions. It also requires additional page parts which lets say in document is one page part too many.

I imagine something like: ErrorNotification.SetRecord(Rec);//Save record reference to be used in procedures ErrorNotification.Handle(Rec.Testfield(Field1)).AddAction(MyLocalProcedure);//CatchError and AddAction //Add handlers like in test codeunit Assert ErrorNotification.HandleIsNotEmpty(Rec.Field2); ErrorNotification.HandleIsGreaterThen(Rec.Field3, Rec.Field4); if SomeCondition then ErrorNotification.AddError('SomeConditionError').AddAction('MyLocalProcedure2'); if not ErrorNotification.IsEmpty then ErrorNotification.ThrowError;

Finaly platform could make sure that errors unhandled by code would automaticaly be validated and an error would be thrown before commiting to database.

ik3ras avatar Dec 20 '18 08:12 ik3ras

Great idea! This idea is not strictly related to the development process and implementing it will require a coordinated effort across many teams in our organization. Go ahead and post this to our Ideas forum at https://aka.ms/BusinessCentralideas, or vote up the idea if its already there. We're constantly monitoring top Ideas and will consider them for a future release.

atoader avatar Dec 20 '18 12:12 atoader

Hi, Have a look if this solves the need you have: Use actions to go to or fix errors inline If it doesn't then please go ahead and post this to our Ideas forum at https://aka.ms/BusinessCentralideas, or vote up the idea if its already there. We're constantly monitoring top Ideas and will consider them for a future release.

thpeder avatar Nov 30 '23 10:11 thpeder