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)

Any way to run custom logic writtten on Table insert while importing through Excel addin.

(0) ShareShare
ReportReport
Posted on by

Hi Team,

I am importing one custom table using excel add in ( Add table > Dynamics ax Tab > put data >Publish ). There is some business logic on insert method which i want to get run as soon as any record is inserted into this table either manually or through excel addin. Looks like excel addin insert data in tables without calling any business logic on insert or update method or any table level validation.

*This post is locked for comments

I have the same question (0)
  • Crispin John Augustine Profile Picture
    37,081 on at

    You can run custom Code during Import from Excel addin.

    You have to go to the AIF proxy class for the table, and write your Code there, overriding the doSave() method, after super(). Pay Attention to the TTS Blocks.

  • Community Member Profile Picture
    on at

    Hi Crispin,

    Thanks for your response. But not every table in AX has AIF proxy class but still we can import data in those tables using excel addin. Its an ISV table without any proxy class. Even if i create it then how it is going to call automatically ? I may need to write a code somwhere so that as soon as publish button is clicked on excel, Before inserting data directly to table it should hit my proxy class doSave() method.

  • Verified answer
    Crispin John Augustine Profile Picture
    37,081 on at

    Here's an excellent article explaining the difference between a. creating record from UI/table browser and b. Excel addin

    community.dynamics.com/.../microsoft-dynamics-ax-2012-excel-add-in-questions-and-answers-validation-logic

    At best, you have to put your logic in the table write() method, because insert() is never called in this cycle. In this case, you don't necessarily have to override the doSave() method, but you do need the Proxy class..

  • Community Member Profile Picture
    on at

    Thanks Crispin. Look like this should work.

Under review

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

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