Jump to content

Recommended Posts

Posted
Is it normal for the ARPYMT to return records where the MEGAENTITYID is not set?
 
What is the proper way to get the invoices and credits that the payment is applied to in WebServices with the fewest calls?
 
The calls below even when we group the ARPYMTDETAIL by PAYMENTKEY the counts do not line up and we get unexpected records.
 
ARPYMTDETAIL
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <control>
        <status>success</status>
        <senderid>MySenderID</senderid>
        <controlid>1731529172</controlid>
        <uniqueid>false</uniqueid>
        <dtdversion>3.0</dtdversion>
    </control>
    <operation>
        <authentication>
            <status>success</status>
            <userid>CBUser</userid>
            <companyid>CompanyID</companyid>
            <locationid>Far</locationid>
            <sessiontimestamp>2024-11-13T20:19:32+00:00</sessiontimestamp>
            <sessiontimeout>2024-11-14T08:19:32+00:00</sessiontimeout>
        </authentication>
        <result>
            <status>success</status>
            <function>query</function>
            <controlid>bed51ba0-5dcc-4a1f-90ac-dccce48f4b06</controlid>
            <data listtype="ARPYMTDETAIL" totalcount="3462" offset="0" count="2000" numremaining="1462">
ARPYMT
<response>
    <control>
        <status>success</status>
        <senderid>MySenderId</senderid>
        <controlid>1731529741</controlid>
        <uniqueid>false</uniqueid>
        <dtdversion>3.0</dtdversion>
    </control>
    <operation>
        <authentication>
            <status>success</status>
            <userid>CBUser</userid>
            <companyid>MyCompanyId</companyid>
            <locationid>Far</locationid>
            <sessiontimestamp>2024-11-13T20:29:02+00:00</sessiontimestamp>
            <sessiontimeout>2024-11-14T08:29:02+00:00</sessiontimeout>
        </authentication>
        <result>
            <status>success</status>
            <function>query</function>
            <controlid>b2578ddb-2bcc-44ed-92a5-5f1f3b4d2881</controlid>
            <data listtype="ARPYMT" totalcount="104" offset="0" count="104" numremaining="0">

 

Posted

Can we see what your query looks like?

Note: QUERY by default is only top level.  If you want to include other entity level data, you must set this in your options:

<options>
    <showprivate>true</showprivate>
</options>

Personally, I query on ARPYMTDETAIL and add to my <select> additional relational fields like ARPYMT.DOCNUMBER to get everything all at once.  Then my receiving code will do the grouping/calculations.

        <query>
          <object>ARPYMTDETAIL</object>
          <select>
                <field>RECORDNO</field>
                <field>PAYMENTDATE</field>
                <field>TRX_POSTEDADVANCEAMOUNT</field>
                <field>TRX_POSTEDOVERPAYMENTAMOUNT</field>
                <field>TRX_NEGATIVEINVOICEAMOUNT</field>
                <field>TRX_ADJUSTMENTAMOUNT</field>
                <field>TRX_PAYMENTAMOUNT</field>
                <field>NEGATIVEINVOICEKEY</field>
                <field>ADVANCEKEY</field>
                <field>WHENCREATED</field>
                <field>ARINVOICEITEM.RECORDNO</field>
                <field>ARINVOICEITEM.ACCOUNTNO</field>
                <field>ARINVOICEITEM.TRX_AMOUNT</field>
                <field>ARINVOICEITEM.DEPARTMENTID</field>
                <field>ARINVOICEITEM.LOCATIONID</field>
                <field>ARINVOICEITEM.LOCATIONNAME</field>
                <field>ARINVOICEITEM.CLASSID</field>
                <field>ARINVOICEITEM.PROJECTID</field>
                <field>ARINVOICEITEM.PROJECT.RECORDNO</field>
                <field>ARINVOICEITEM.PROJECT.DEPARTMENTID</field>
                <field>ARINVOICE.RECORDNO</field>
                <field>ARINVOICE.RECORDID</field>
                <field>ARINVOICE.CUSTOMERID</field>
                <field>ARINVOICE.CUSTOMERNAME</field>
                <field>ARINVOICE.WHENCREATED</field>
                <field>ARINVOICE.WHENDUE</field>
                <field>ARPYMT.DOCNUMBER</field>
                <field>ARPYMT.PAYMENTMETHOD</field>
          </select>

 

×
×
  • Create New...