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)

Xml File is not created in Ax2009 AIF Outbound service

(0) ShareShare
ReportReport
Posted on by 765

Hi,

i tried below job. but sales order xml file is not created. Anyone help me to solve this problem..

static void TestCreateSalesOrderXML(Args _args)
{
Query querySalesTable = new Query();
AifConstraintList aifConstraintList = new AifConstraintList();
AifConstraint aifConstraint = new AifConstraint();
AifActionId actionId;
AifEndpointList endPointList;
QueryBuildDataSource qbdsCust, qbdsSales;
QueryBuildRange qbrCust, qbrSales;
;

qbdsCust = querySalesTable.addDataSource(tablenum(CustTable));
qbrCust= qbdsCust.addRange(fieldnum(CustTable, AccountNum));
qbrCust.value(strfmt('!= %1', queryValue("")));
qbdsSales = qbdsCust.addDataSource(tablenum(CustTable));

qbdsSales.relations(false);
qbdsSales.joinMode(joinMode::InnerJoin);
qbdsSales.addLink(fieldnum(CustTable, AccountNum), fieldnum(SalesTable, CustAccount));

aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint);

actionId = AifSendService::getDefaultSendAction(classnum(BBB_WIT_AxdSalesOrderService), AifSendActionType::SendByQuery);

if (actionId)
{
endPointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
if(endpointList.getEndpointCount()>0)
AifSendService::submitFromQuery(actionId,endPointList,querySalesTable,AifSendMode::Async);
}

new AifOutboundProcessingService().run();
new AifGatewaySendService().run();


}

Thanks In Advance.....

Regards,

Saravanaa

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at

    Where do you expect it to get generated? Is your endpoint configured accordingly? Did the services finished successfully? If not, review and resolve the errors. If they did, you probably don't have the setup correct after all. If everything fails, just debug the code to see what's wrong.

  • Saravanaa Profile Picture
    765 on at

    Hi Martin,

             The xml file is generated in my shared location. EndPoint and service all are successfully finished. but joining two tables (CustTable,SalesTable) means its doesn't generate xml file. i couldn't find where i did mistake.

  • Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at

    What's your definition of "successfully finished", if you're saying at the same time that it doesn't work? Have you checked AIF exceptions? Status of the queues? Debugged the code?

  • Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at

    Also, does the query return any data?

    Don't try to guess (or don't expect somebody to guess) what's wrong - debug and analyze what actually happens.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans