web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How can I completely regenerate AIF service's schema?

(0) ShareShare
ReportReport
Posted on by 455

Hi guys,

Hope you're having great holidays and have been able to unplug a bit. I'm getting there, right after I finish my fight with AIF :)

I'm making a number of changes to the SalesSalesOrderService. I have no problem with AIF picking up new fields I had created on SalesTable and SalesLine. However, I also need to add extra datasource to the AxdSalesQuery, feeding off the SalesLine level. When I did it and followed the usual procedure - regenerate AxBC classes and then refresh services from AifService form - I'm getting errors on the schema level. It stats complaining that one of the _BR types is not there. I thought fine, I have no need for Brazil-related fields so I went ahead and deleted SalesTable_BR and SalesLine_BR datasources in the query but it's still complaining about the same type even though I can see it didn't include _BR classes into the project so it's clearly recognizing they're no longer needed. I can still see the old fields in AifDocumentField table though and they are a part of the schema in the schema store. The other issue, equally important, is that the system didn't pick up my new datasource fields into the schema even though it correctly generated AxBC classes for it.

I've done some research on it and it seems that AifDocumentField contents can be regenerated based on the xml schema. How do I completely regenerate that schema in the schema store though? I even tried deleting the corresponding metadata from several tables - AifDocumentField, AifDocumentSchemaTable and AifSchemaStore but I couldn't make AX recreate it. 

So my question is - what do I need to completely regenerate AIF schema and fields? If there's no good procedure, feel free to throw classes/methods my way and I'll try to build up a job to do it.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,775 Super User 2026 Season 1 on at

    Hi Alex,

    You need to regenerate the AXBC classes. Have a look at this page: msdn.microsoft.com/.../ff628056(v=ax.50).aspx

    This is a description for AX 2009 but also applies to AX 2012.

  • Alex Kaganov Profile Picture
    455 on at

    Hi Andre,

    Thank you for the quick reply! All AxBC classes are regenerated and I see new classes related to the datasource I added to the query. I also see there're no classes in the project related to the datasources I excluded. However, even after I run Refresh from the AifService form, the schema and AIfDocumentField table still have the fields from the excluded datasources and don't have the fields from the newly added datasource. I do restart AOS to make sure I'm not looking at cached data and check directly in SQL as well. So I need a way to completely regenerate the schema from updated AxBC classes.

  • Verified answer
    Ben H. Profile Picture
    175 on at

    Hi Alex,

    have you tried deleting and re-adding the service operations in the port configuration? Of course, this resets all data policies, but if you save them beforehand, it may be worth a try.

    BTW, I found using this two methods to completely refresh a service in the follwing order very helpful:

    AifServiceGenerationManager::registerService(AifAction.ServiceName);
    AifDataPolicy::synchronize(AifPort.Name, AifPortDocument.DocumentClassId);

    Best regards, Ben

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans