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.
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.
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,