Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

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

try

{

ttsBegin;

// Add condition

ttsCommit;

}

Catch

{

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.

Regards,

Rahul

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,283 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,019 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans