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 :
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

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

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 499 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans