Skip to main content



No record found.

Microsoft Dynamics AX forum

How to show error in exception handling while import the excel file in D365FO

Posted on by 630

Hi Team,

I am try to import excel file using dialog box and in dialog box i have added pre validation button what this pre validation button is do if in excel file have any incorrect data like if column size is more then 10 then it will show the error.

for that i have use exception handling




// Add condition





catch (Exception::Error)

info("Data is not correct”);


So when i click on pre validation button first time no error is showing but when i click on second time error is coming. I have checked using debugger both time same value is taking.

Can you let me know why when i click on pre validation button first time no error is coming and when i click on second time at that time error is coming but i want to show the error when i click on pre validation button on first time.



Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans