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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Document service on outbound port produces XML file missing a field

(0) ShareShare
ReportReport
Posted on by 30

Hi,

I have modified document query AxdPurchaseRequisition to include the name of the person that placed the order. I added the section in red, as shown below.

UsingDirPerson.png

This query is used by an outbound port to produce an XML file.

After I made the modifications, I updated the related document service, refreshed AIF services, generated incremental CIL, and configured the document data policy on the outbound port to include the new field in the generated XML file.

DataPolicy.PNG

But when I test the outbound port it produces an XML file that does not contain the required Name field. It also doesn't contain any <HcmWorker> nor <DirPerson> elements.

To verify whether the query actually works, I created a job with some test code. Below is the job code.

For this test I am using the same purchase order as used when testing the outbound port. 

    AxdPurchaseRequisition axdPR;
    Query q = new Query(queryStr(AxdPurchaseRequisition));
    QueryRun qr;
    Common vpoj;
    Common ptav;
    Common hw;
    DirPerson dp;

    QueryBuildDataSource qbds_vpoj;
    QueryBuildRange qbr_vpoj_purchid;

    qbds_vpoj = q.dataSourceName("VendPurchOrderJour");
    qbr_vpoj_purchid = qbds_vpoj.addRange(fieldNum(VendPurchOrderJour, PurchId));
    qbr_vpoj_purchid.value(queryValue("2100002142"));

    qr = new QueryRun(q);

    while (qr.next())
    {
        vpoj = qr.get(tableNum(VendPurchOrderJour));
        ptav = qr.get(tableNum(PurchTableAllVersions));
        hw = qr.get(tableNum(HcmWorker));
        dp = qr.get(tableNum(DirPerson));

        info(strFmt("vpoj recid = %1 > ptav recid = %2 > hw recid = %3 > dp recid = %4 (%5)", vpoj.RecId, ptav.RecId, hw.RecId, dp.RecId, dp.Name));
    }

This is an example of a line that is logged by the info method.

vpoj recid = 5637646205 > ptav recid = 5637693916 > hw recid = 5637167875 > dp recid = 5637203889 (John Doe)

Thus, the query actually returns a DirPerson record, which includes the Name field.

Would there be anything left to configure on the outbound port to make this work? The query seems to work properly when executing it from my test code, so I'm inclined to think nothing needs to change about the query.

Any advice or thoughts on this?

Thanks,

I have the same question (0)

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 646 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans