Skip to content

Order Entry Transaction Functions do not return results #198

@ryanflores-bayalarm

Description

@ryanflores-bayalarm

When creating, updating, and deleting results using the following classes, the Result object within the OnlineResponse object returns an empty array:

  • /src/Intacct/Functions/OrderEntry/OrderEntryTransactionCreate
  • /src/Intacct/Functions/OrderEntry/OrderEntryTransactionUpdate
  • /src/Intacct/Functions/OrderEntry/OrderEntryTransactionDelete

More specifically, OnlineResponse::$results[0]->data is empty when in fact something should be returned. This is important because it would help to receive the value of DOCID so that follow-up requests could be made. This is especially important for OrderEntryTransactionCreate to return the value so that follow-up requests could be made using either OrderEntryTransactionUpdate or OrderEntryTransactionDelete when needed.

As an interim solution, users would have to make a wasteful Query, searching for the SODOCUMENT object that was just created in order to get the value DOCID.

I did some research into why an empty array was being returned, and it's because the <key> isn't wrapped in a <data> element and/or <SODOCUMENT> element, which I believe the SDK (or response handler) is expecting with the response that's returned. Here's a sample of what the <result> element looks like as returned by OrderEntryTransactionCreate:

        <result>
            <status>success</status>
            <function>create_sotransaction</function>
            <controlid>[REDACTED]</controlid>
            <key>Sales Order-[REDACTED]</key>
        </result>

Here's a sample of what gets returned by other requests when Result::$data is NOT empty:

        <result>
            <status>success</status>
            <function>query</function>
            <controlid>[REDACTRED]</controlid>
            <data listtype="SODOCUMENT" totalcount="1" offset="0" count="1" numremaining="0">
                <SODOCUMENT>
                    <RECORDNO>[REDACTRED]</RECORDNO>
                    <DOCNO>[REDACTRED]</DOCNO>
                    <DOCID>Sales Order-[REDACTRED]</DOCID>
                    <DOCPARID>Sales Order</DOCPARID>
                </SODOCUMENT>
            </data>
        </result>

It would also be nice if RECORDNO were returned when creating a sales order in addition to DOCID in case it might be needed for something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions