web
You’re offline. This is a read only version of the page.
close
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 632

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans